Village Scenario Report
Village Scenario Report
(BUBT)
Department of Computer Science and Engineering
Submitted by Submitted to
Nazmul Hassan 20211203036 Khondokar Oliullah
Ahsan Mahbub 20211203009
Lecturer, Department of CSE
Chayan Das Gupta 20211203024
(BUBT)
Nizamul Haq Sohan 20211203011
Md. Nuruzzaman 15163203102 (24)
Introduction ......................................................................................................................................3
Objectives ........................................................................................................................................4
Methodology ....................................................................................................................................5
Features and Functionality ..............................................................................................................6
Implementation ................................................................................................................................7
Screenshot ........................................................................................................................................9
Results and Analysis .....................................................................................................................10
Conclusion .....................................................................................................................................11
Page | 2
Introduction
In this Computer Graphics project, we will design a Village scenario near the
Town. Computer graphics play a vital role in various domains, including
gaming, virtual reality, animation, and scientific visualization. It involves the
creation, manipulation, and rendering of images using computer algorithms.
One of the widely used graphics libraries are OpenGL, which provides a
powerful and efficient framework for developing interactive graphics
applications.
Page | 3
OBJECTIVES
The objectives of this OpenGL animation and drawing project for computer
graphics are as follows:
• Familiarize with Computer Graphics Concepts: Gain a solid
understanding of fundamental computer graphics concepts, including
coordinate systems, transformations, and rendering techniques.
• Learn OpenGL Programming: Acquire proficiency in OpenGL
programming and understand its core features and functionalities.
• Implement Drawing Techniques: Implement various drawing techniques
using OpenGL. This may involve developing algorithms for line drawing,
polygon filling and other fundamental drawing operations.
• Create Interactive Animations: Design and implement animated scenes
with smooth transitions, object movements, and visual effects.
• Incorporate User Interaction: Enable user interaction within the
animation. Implement mechanisms to handle user input, such as mouse and
keyboard events, to control the animation or manipulate objects in real-time.
This interaction should enhance the overall user experience and allow for
dynamic control over the animation.
• Evaluate Performance and Efficiency: Assess the performance and
efficiency of the implemented graphics application. Measure and analyze
factors such as frame rate, rendering quality, and responsiveness to user
input.
• Documentation and Report: Create a comprehensive project report
documenting the entire development process. This report should include an
overview of the project, implementation details, code snippets, screenshots
of the animation, evaluation of the results, and a conclusion summarizing the
achievements and potential future enhancements.
Page | 4
METHODOLOGIES
Page | 5
FEATURES AND FUNCTIONALITY
Page | 6
Implementation
We use the Programming in C and C++ code for our project. The Programming and Coding
details are given below.
What is C Programming?
C is a general-purpose programming language that is extremely popular, simple, and
flexible to use. It is a structured programming language that is machine-independent and
extensively used to write various applications, Operating Systems like Windows, and many
other complex programs like Oracle database, Git, Python interpreter, and more.
What is C++ Programming?
C++ is a cross-platform language that can be used to create high-performance applications.
C++ was developed by Bjarne Stroustrup, as an extension to the C language. C++ gives
programmers a high level of control over system resources and memory.
#include<windows.h>
#include<GL/glut.h>
#include<stdlib.h>
#include<math.h>
#include <GL/gl.h>
using namespace std;
float bx = 10;
Page | 7
void Building3() {----------}
void display(void) {
glClear(GL_COLOR_BUFFER_BIT);
//Ground
glColor3ub(0, 255, 100);
glBegin(GL_POLYGON);
glVertex2d(0, 0);
glVertex2d(500, 0);
glVertex2d(500, 140);
glVertex2d(0, 140);
glEnd();
Building1();
Building2();
Building3();
River();
Boat();
Road();
Hills1();
Hills2();
Car();
Bus();
glColor3ub(255, 215, 0);
Sun(20, 22, 460, 460);
glFlush();
Page | 8
Screenshot
Page | 9
Results and Analysis
The “Village near the Town” Project by OpenGL for computer graphics has been
implemented successfully, resulting in a visually appealing and interactive graphics
application.
The animation framework allows for smooth transitions and object movements. - Objects
are animated using various transformations, such as translation, rotation, and scaling.
The implemented drawing techniques, such as line drawing algorithms, polygon filling,
and curve rendering, produce accurate and visually pleasing results.
The lighting models, such as Phong or Gouraud shading, simulate realistic lighting effects.
- Objects respond accurately to different lighting conditions, producing highlights,
shadows, and reflections. - Materials and properties assigned to objects enhance their
appearance and interact with light sources.
Overall, the implemented features and functionalities of the OpenGL animation and
drawing project have met the project’s objectives and requirements. The application
delivers an interactive and visually pleasing experience to users, with smooth animations,
accurate drawing techniques, realistic lighting and shading effects, and user-friendly
interaction. The performance and efficiency of the application are assessed, and
optimization techniques are employed to ensure smooth real-time rendering.
By evaluating and refining the project based on user feedback and performance analysis, it
can be enhanced and extended for use in various computer graphics applications.
Page | 10
Conclusion
In conclusion, the Village near the Town animation and drawing project for computer
graphics has successfully achieved its objectives and demonstrated the capabilities of
OpenGL in creating interactive animations and implementing various drawing techniques.
The project has explored fundamental concepts of computer graphics, including coordinate
systems, transformations, and rendering techniques, while leveraging the features and
functionalities provided by OpenGL.
Through the project, a robust animation framework has been developed, allowing
for smooth transitions, object movements, and user interaction. Drawing techniques,
such as line drawing algorithms, polygon filling, and curve rendering, have been
implemented accurately and efficiently. Lighting and shading models have been applied to
create realistic lighting effects, while texture mapping has enhanced the visual quality
of objects and surfaces.
The performance and efficiency of the application have been evaluated, and rendering
optimizations have been implemented to ensure real-time rendering and smooth
user experience. The project’s results showcase a visually appealing and interactive
graphics application that fulfills the project requirements.
The project’s success highlights the importance and versatility of computer graphics
in various domains, including gaming, virtual reality, and scientific visualization. By
utilizing OpenGL and its extensive feature set, developers can create visually rich and
engaging graphics applications.
In the future, the project can be further enhanced by incorporating advanced visual
effects, optimization techniques, and additional drawing and animation features. Continual
evaluation and refinement based on user feedback and performance analysis will allow for
ongoing improvement and expansion of the application.
Overall, this project has provided valuable hands-on experience in Computer Graphics and
OpenGL programming, deepening understanding of key concepts while showcasing the
power of OpenGL for animation and drawing in Computer Graphics applications.
Page | 11