You are on page 1of 26

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

“Jnana Sangama”, Belagavi - 590018

A MINI PROJECT REPORT ON


“AIRSHOW”

Submitted in the partial fulfilment of the requirement for the sixth semester of
BACHELOR OF ENGINEERING
In
COMPUTER SCIENCE & ENGINEERING
By
PRIYANKA K A (1RR20CS086)
PRAJWALA UDAY NADAKARNI (1RR20CS83)

Under the guidance of


Mrs. MEGHA L
Asst. Professor
Dept. of CSE, RRCE

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

RAJARAJESWARI COLLEGE OF ENGINEERING


MYSORE ROAD, BANGALORE-560074
(An ISO 9001:2008 Certified Institute)
(2022-23)

NGALORE-560074 .
(An ISO 9001:2008 Certified Institute) (2020-21)
RAJARAJESWARI COLLEGE OF ENGINEERING
MYSORE ROAD, BANGALORE-560074
(An ISO 9001:2008 Certified Institute)
(Affiliated to Visvesvaraya Technological University, Belagavi)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE
Certified that mini project work entitled
“AIRSHOW”
Carried out by
PRIYANKA K A (1RR20CS086) PRJWALA UDAY NADAKARNI
(1RR20CS083)
The students of “RajaRajeshwari College of Engineering” in partial fulfillment for the
sixth semester of Bachelor Of Engineering in Computer Science & Engineering of the
Visvesvaraya Technological University, Belgaum during the year 2022-23. It is certified that all
corrections/suggestions indicated for Internal Assessment have been incorporated in the report
deposited in the departmental library. The mini project report has been approved as it satisfies the
academic requirements in respect of mini project work prescribed for the sixth semester.

…………….................. ……………………………

Signature of guide Signature of HOD

[Mrs. MEGHA L] [Dr. S.USHA]


Asst. Professor, Dept. of CSE Prof. & HOD, Dean Research,
RRCE, Bangalore Dept. of CSE
RRCE, Bangalore

External Viva-Voce
Examiners: Signature

1. ______________________
2. ______________________
ABSTRACT

The "Airshow Project" is a computer graphics project that aims to simulate an air
show environment using various techniques and algorithms. The project involves
creating a 3D virtual environment that includes a runway, aircraft, and various other
objects. The aircraft are modeled using 3D modeling software and are animated
using keyframe animation techniques.
The environment is rendered using lighting and shading techniques to create a
realistic look and feel. The project also includes sound effects and background music
to enhance the user experience.
The goal of the project is to provide an immersive and interactive experience for the
user, allowing them to feel as if they are part of an air show.
The project can be used for entertainment purposes, as well as for training and
educational purposes.
The project showcases the use of various computer graphics techniques and
algorithms to create a realistic and interactive simulation of an air show.
The project features various aircraft performing aerial stunts and maneuvers.
The main objective of the project is to create a realistic and immersive experience
for the audience, while also demonstrating the advanced capabilities of computer
graphics technology.
The project is designed to be visually stunning and engaging, and to provide a unique
and memorable experience for viewers.

i
ACKNOWLEDGEMENT

We are truly thankful and convey our sincere gratitude to the principal,
Dr. R Balakrishna, RajarajesHwari College of Engineering, Bangalore.
We convey our sincere gratitude to Dr. S Usha, HOD & Dean Research, Department
of Computer Science & Engineering for her meticulous support, continuing, co-
operation, valuable suggestion and encouragement during the development of
project we also extend our thanks to her for her invaluable guidance to imbibe the
requisite knowledge for success of our mini project.
We convey our sincere gratitude to Mrs. Megha L, Assistant Professor, Department
of Computer Science & Engineering, for her meticulous support continuing co-
operation, valuable suggestion and encouragement during the development of
project. We also extend our thanks to her for invaluable guidance to imbibe the
requisite knowledge for success of our project, as an internal guide. We are very
much obliged.
We also thank our parents who have encouraged us and supported in every stage of
development of this project.
Last but not the least, our wishes to the entire Computer Science Department for
their help and guidance, encouragement, inspiration and co-operation at all stages of
the development of this project without which this project wouldn’t have been a
success. Finally, we express our heartfelt gratitude to all those who helped us to
complete the mini project work successful providing support, suggestions, advise,
guidance and much needed encouragement.

PRIYANKA K A (1RR20CS086)
PRAJWALA UDAY NADAKARNI (1RR20CS083)
ii
TABLE OF CONTENTS

Abstract i
Acknowledgement ii
List of Figures iii
Chapter 1 : Introduction 1
• Chapter 1.1: History 2
• Chapter 1.2: Pioneers In Graphic Design 3
Chapter 2 : Literature Survey 4
Chapter 3 : Problem Definition 6
Chapter 4 : System Requirements 7
Chapter 5 : Design And Implementation 8
• Chapter 5.1 : Flowchart And Architecture 8
• Chapter 5.2 : Concepts And Principles of OpenGL 9
• Chapter 5.3 : OpenGL Related Libraries 10
• Chapter 5.4 : Windows Management In OpenGL 10
• Chapter 5.5 : Callback Functions 11
• Chapter 5.6: Running The Program 14
Chapter 6 : Snapshots 15
Conclusion 18
Bibliography 19
LIST OF FIGURES

➢ Fig 1. Start Menu


➢ Fig 2. Help Menu
➢ Fig 3. Projecting Downwards
➢ Fig 4. Projecting Upwards
➢ Fig 5. Tricolor Is Being Displayed Through Smoke Function

iii
CHAPTER 1
INTRODUCTION
Graphics provides one of the natural means of communicating with a computer.
Graphics has also become a key technology for communicating ideas, data and trends
in most areas of commerce, science, engineering and education. So graphics refers to
pictures, sketch of building, flowcharts, control flow diagrams, bar charts, and pie
charts.
Computer graphics is the creation, manipulation and storage of models and images
of picture objects by the aid of computers. This was started with the display of
plotters and CRT. Computer graphics is also defined as the study of techniques to
improve the communication between user and machine. Thus computer graphics is
one of the effective media of communication between machine and user.
Classification:
Computer graphics is broadly classified into three categories:
• Based on type of Object
2-Dimensional Graphics (Ex. Pixel, line, circle etc...)
3-Dimensional Graphics (Ex. Cube, polyhedron etc...)
• Based on User Interaction
Interactive Computer Graphics
Non-Interactive Computer Graphics
• Based on Application
Business or presentation Graphics
Scientific Graphics
Scaled Drawings
Cartoons, games and art work

Dept. of CSE, RRCE 2022-2023 1


1.1 HISTORY

The term computer graphics has been used in a broad sense to describe almost
everything on computers that is not text or sound. Typically, the term computer
graphics refers to several different things:
• The representation and manipulation of image data by a computer the various
technologies used to create and manipulate images
• The images so produced, and
• The sub-field of computer science which studies methods for digitally
synthesizing and manipulating visual content see study of computer graphics.
The advance in computer graphics was to come from one MIT student, Ivan
Sutherland. In 1961 Sutherland created another computer drawing program called
Sketchpad. Using a light pen, Sketchpad allowed one to draw simple shapes on the
computer screen, save them and even recall them later. The light pen itself had a small
photoelectric cell in its tip. This cell emitted an electronic pulse whenever it was placed
in front of a computer screen and the screen’s electron gun fired directly at it. By
simply timing the electronic pulse with the current location of the electronic gun, it
was easy to pinpoint exactly where the pen was on the screen at any given moment.
Once that was determined, the computer could then draw a cursor at that location.
These early computer graphics were Vector graphics, composed of thin lines whereas
modern day graphics are Raster based using pixels. The difference between vector
graphics and raster graphics can be illustrated with a shipwrecked sailor. He creates
an SOS sign in the sand by arranging rocks in the shape of the letters” SOS”. The
rock SOS sign is similar to raster graphics. Every pixel has to be individually
accounted for. The rope SOS sign is equivalent to vector graphics. The computer
simply sets the starting point and ending point for the line and perhaps bends it a little
between the two end points.

Dept. of CSE, RRCE 2022-2023 2


1.2. PIONEERS IN GRAPHIC DESIGN

Charles Csuri
Charles Csuri is a pioneer in computer animation and digital fine art and created
the first computer art in 1964.Csuri was recognized by Smithsonian as the father of
digital art and computer animation, and as a pioneer of computer animation by the
Museum of Modern Art (MoMA) and (ACM-SIGGRAPH).

Donald P. Greenberg
Donald Greenberg is a leading innovator in computer graphics. Greenberg has
authored hundreds of articles and served as a teacher and mentor to many prominent
computer graphics artists, animators, and researchers such as Robert L. Cook, Marc
Levoy, and Wayne Lytle. Many of his former students have won academy awards for
technical achievements and several have won the SIGGRAPH achievement award.
Greenberg was the founding director of the NSF center for computer graphics and
scientific visualization.

Michael Noll
Noll was one of the first researchers to use a digital computer to create artistic
patterns and to formalize the use of random processes in the creation of visual arts.
He began creating digital computer art in 1962, making him one of the earliest digital
computer artists. In 1965, Noll along with FriederNake and Georg Nees were the first
to publicly exhibit the computer art. During April 1965, the Howard Wise Gallery
exhibited Noll’s computer art along with random-dot patterns by BelaJulesz.

Dept. of CSE, RRCE 2022-2023 3


CHAPTER 2
LITERATURE SURVEY
Computer graphics started with the display of data on hardcopy plotters and cathode
ray tube (CRT) screens soon after the introduction of computers.
Computer graphics today largely interactive, the user controls the contents, structure,
and appearance of objects and of displayed images by using input devices, such as
keyboard, mouse, or touch-sensitive panel on the screen. Graphics based user
interfaces allow millions of new users to control simple, low-cost application
programs, such as spreadsheets, word processors, and drawing programs.
OpenGL (Open Graphics Library) is a standard specification defining a cross-
language, cross-platform API for writing applications that produce 2D and 3D
computer graphics. The interface consists of over 250 different function calls which
can be used to draw complex three-dimensional scenes from simple primitives.
OpenGL was developed by Silicon Graphics Inc. (SGI) in 1992 and is widely used
in CAD, virtual reality, scientific visualization, information visualization, and flight
simulation. It is also used in video games, where it competes with Direct3D on
Microsoft Windows platforms (see Direct3D vs. OpenGL). OpenGL is managed by
the non-profit technology consortium, the Chromos Group.
By the early 1990s, Silicon Graphics (SGI) was a leader in 3D graphics for
workstations. SGI's competitors (including Sun Microsystems, Hewlett-Packard and
IBM) were also able.
In addition, SGI had a large number of software customers; by changing to
the OpenGL API, they planned to keep their customers locked onto SGI (and IBM)
hardware for a few years while market support for OpenGL matured to bring to
market 3D hardware, supported by extensions made to the PHIGS standard. In 1992,
SGI led the creation of the OpenGL architectural review board (OpenGL,ARB),on

Dept. of CSE, RRCE 2022-2023 4


promise of bringing order to the world of interactive 3D computer graphics APIs, but
on account of financial constraints at SGI, strategic reasons at Microsoft, and general
lack of industry support, it was abandoned in 1999.
Many OpenGL functions are used for rendering and transformation purposes.
Transformations functions like glRotate (), glTranslate (), glScaled () can be used.
OpenGL provides a powerful but primitive set of rendering command, and all higher-
level drawing must be done in terms of these commands. There are several libraries
that allow you to simplify your programming tasks, including the following:
OpenGL Utility Library (GLU) contains several routines that use lower-level
OpenGL commands to perform such tasks as setting up matrices for specific viewing
orientations and projections and rendering surfaces.
OpenGL Utility Toolkit (GLUT) is a window-system-independent toolkit, written by
Mark Kill guard, to hide the complexities of differing window APIs.
To achieve the objective of the project, On 17 December 1997, Microsoft and SGI
initiated the Fahrenheit project, which was a joint effort with the goal of unifying the
OpenGL and Direct3D interfaces. In 1998 Hewlett-Packard joined the project.
[Donald D Hearn and Pauline Baker, "Computer Graphics with OpenGL", 3rd
Edition]. It initially showed some information related to the light sources is required
with OpenGL we can manipulate the lighting and objects in a scene to create many
different kinds of effects. It explains how to control the lighting in a scene, discusses
the OpenGL conceptual model of lighting, and describes in detail how to set the
numerous illumination parameters to achieve certain effects. Polygons are typically
drawn by filling in all the pixels enclosed within the boundary, but we can also draw
them as outlined polygons or simply as points at the vertices. This concept is obtained
from. The properties of a light source like its material, diffuse, emissive, has to
mention in the project. So to design the light source and the objects, programming
guide of an OpenGL is used.
Dept. of CSE, RRCE 2022-2023 5
CHAPTER 3
PROBLEM DEFINITION
The project AIRSHOW is created to demonstrate OpenGL’s concepts. It encompasses
some of the skills learnt in our OpenGL classes such as pushmatrix() ,translate()
,popmatrix(), scale(). The scope is to use the basic primitives defined in OpenGL
library creating complex objects. Expected Input will be the keyboard and mouse click
events and expected output is the movement and rotational motion of the airplanes.
The existing airshow lacks visually appealing computer graphics that can enhance the
overall experience for the audience. The organizers are seeking a solution to create
and display computer-generated graphics synchronized with the aerial performances
to make the event more engaging and memorable.
Key Challenges:
Realism: The computer graphics should be highly realistic and visually appealing to
create an immersive experience for the audience. The challenge lies in creating
graphics that accurately depict aircraft, smoke trails, explosions, and other visual
effects.
Synchronization: The graphics should be synchronized with the aerial performances,
meaning they should seamlessly integrate with the timing and movements of the
aircraft. Achieving perfect synchronization between the live displays and the
computer-generated graphics poses a significant challenge.
Performance: The software must be able to render and display the graphics in real-
time, ensuring smooth and uninterrupted playback throughout the event. This requires
optimizing the performance of the graphics engine and minimizing any potential
delays or glitches.
Safety and Accuracy: The graphics should not interfere with the pilots' visibility or
distract them during their performances.

Dept. of CSE, RRCE 2022-2023 6


CHAPTER4
SYSTEM REQUIREMENTS
4.1 SOFTWARE REQUIREMENTS
• Operating System : Windows 95/98SE/XP
• Language : C/C++
• Compiler : Microsoft visual basic C++ 6.0,
• OpenGL : library Files And dll files

4.2 HARDWARE REQUIREMENTS


• Processor : Pentium PC
• RAM : 128 MB
• Hard Disk : 20 GB(approx.)
Monitor: VGA Color Monitor

Dept. of CSE, RRCE 2022-2023 7


CHAPTER 5
DESIGN & IMPLEMENTATION

5.1 FLOWCHART/ARCHITECTURE

START

Main() Init()

Display() Keyboard() Mouse()

Bridge (), Plane (), Ground


(), Cloud(), DrawSmoke(), glutIdleFunc(straight)
translate(), popMatrix()

pushMatrix(),
translate(), popMatrix()

Dept. of CSE, RRCE 2022-2023 8


5.2 CONCEPTS AND PRINCIPLES OF OPENGL
The OpenGL model
Figure relationships between an application program, the graphics system,
input and output devices, and the user.
The Graphical Interaction:
The application program has its own internal model. It draws the graphics
using the facilities of the graphics system. The user views the graphics, and uses input
devices, such as a mouse, to interact. Information about the users is sent back to the
applications are sent back to the application, which decides what action to take.
Typically, it will make changes to its internal model, which will cause the graphics to
be updated, and so another loop in the interaction cycle begins.

Application model

Application program

Graphics system (OpenGL)

Mouse etc. Display


User
Fig 5.2: Graphical interaction loop
5.3 OPENGL related libraries : LIBRARIES
OpenGL provides a powerful but primitive set of rendering command, and all the
higher-level drawing must be done in terms of these commands. There are several

Dept. of CSE, RRCE 2022-2023 9


libraries that allow you to simplify your programming tasks, including the following:
• OpenGL Utility Library (GLU) contains several routines that use lower-level
OpenGL commands to perform such tasks as setting up matrices for specific
viewing orientations and projections and rendering surfaces.
• OpenGL Utility Toolkit (GLUT) is a window-system-independent toolkit,
written by Mark Kilgard, to hide the complexities of differing window APIs.
• Include Files:For all OpenGL applications, you want to include the gl.h header
file in every file. Almost all OpenGL applications use GLU, which also requires
inclusion of the glu.h header file. So almost every OpenGL source file begins
with:

#include<GL/gl.h>; #include<GL/glu.h>
5.4 WINDOWS MANAGEMENT IN OPENGL
Five routines perform tasks necessary to initialize a window.
• glutInit(int *argc, char **argv) initializes GLUT and processes any command line
arguments (for X, this would be options like –display and -geometry). It should
be called before any other GLUT routine.
• glutInitDisplayMode(unsigned int mode) specifies whether to use an RGBA or
color-index color model. We can also specify whether we want a single or double
buffered window. We can use this routine to indicate the window to have associated
depth, stencil or accumulation buffer.
GLUT SINGLE: selects a single-buffered window which is the default if isn’t
called; GLUT DOUBLE: selects a double-buffered window.
• glutInitWindowPosition (intx, inty) specifies the screen location for the upper-left
corner of your window.
• glutInitWindowSize (intwidth,intsize) specifies the size, pixels, windows

Dept. of CSE, RRCE 2022-2023 10


• glutCreateWindow (char *string) creates a window with an OpenGL context. It
returns a unique identifier for the new window.

5.5 CALLBACK FUNCTIONS


All callback function, more often just called a callback, in C function, written by the
application programmer. But there’s one important difference between a callback
function and an ordinary C function: application never calls the callback function
directly. Instead, the callback function is called by OpenGL.
The Display Callback:
glutDisplayFunc(void (*func)(void)) is the first and most important event callback
function. Whenever GLUT determines the contains of the window to be redisplayed.
• The callback function registered by glutDisplayFunc () is executed. Therefore,
we should put all the routines you need to redraw the scene in the display
callback function.
• Void glutDisplayFunc(void(*func) (void));

glutDisplayFunc() registers the name of the callback function to be invoked when


OpenGL needs to redisplay the contents of the window. The application must register
a display function – it is not optional.
If your program changes the contents of the window, sometimes you will have to call
glutPostRedisplay(void), which gives glutMainLoop () a nudge to call the registered
display callback at its next opportunity.
The Keyboard Callback:
• void glutKeyboardFunc(void(*func)(unsigned char key,intx,inty));
• glutKeyboardFunc() registers the application function to call when OpenGL
detects a key press generating an ASCII character. This can only occur when the
mouse focus is inside the OpenGL window. It expects a function func() which
returns void, and has three arguments key, x and y. So, it’s function is:
Dept. of CSE, RRCE 2022-2023 11
void keyboard(unsigned char key,intx,inty)
{
/* called when a key is pressed */
}
Three values are passed to the callback function: key is the ASCII code of the key
pressed; x and y give the pixel position of the mouse at the time. Inside the keyboard()
callback, we look at the value of key. If it’s 27 we call the standard C function exit()
to terminate the program cleanly.
The Mouse Callback:
void glutMouseFunc(void (*func)(intbutton, intstate , intx, inty))

glutMouseFunc () register an application callback function which GLUT will call


when the user presses a mouse button within the window. The following values are
passed to the callback function:
button records which button was pressed, and can be:-GLUT LEFT BUTTON

-GLUT MIDDLE BUTTON


-GLUT RIGHT BUTTON
• state records whether the event was generated by pressing the button (GLUT
DOWM), or releasing it (GLUT UP).
• x,y give the current mouse position in pixels. Note: when using OpenGL with X,
the mouse y position is measured from the top of the window.
• Handling Input Events:

You can use these routines to register callback commands that are invoked when
specified events occur.
• glutReshapeFunc(void(*func) (intw, inth)) indicates what action should be
taken when the window is resized.

glutKeyboardFunc(void(*func)(unsignedchar,key,intx,inty)) and the other one is


Dept. of CSE, RRCE 2022-2023 12
glutMouseFunc(void(*func)(intbutton,intstate,intx,ints)) allow you to
• link a keyboard key or a mouse button with routine that is invoked when the key
or mouse button is pressed or released.
• glutMotionFunc (void (*func) (intx, inty)) registers a routine to call back when
the mouse is moved while a mouse button is also pressed.

Translation
• void glTranslatef (GLfloatx, GLfloaty, GLfloatz);
glTranslatef () creates a matrix M which performs a translation by (x,y,z) and
then post-multiplies the current matrix by M.
Scaling
• void glScalef (GLfloatx,GLfloaty,GLfloatz);
glScalef () creates a matrix M which performs a scale by (x,y,z) and then post-
multiplies the current matrix by M.
Rotation
• void glRotatef(GLfloatangle,GLfloatx,GLfloaty,GLfloatz);
glRotate() creates a matrix M which performs a counter-clockwise rotation of
angle in degrees. The axis about which the rotation occurs in the vector from
the origin (0, 0, 0) to the point (x,y,z),and then post-multiplies the current matrix
by M.
Push and Pop Operations:
There are two functions which operate on the current matrix stack:
glPushMatrix()
glPopMatrix()
voidglPushMatrix(void); Pushes the current matrix stack down one level. The
matrix on the top of the stack is copied into the next-to-top position.
void glPopMatrix(void); Pops the current matrix stack, moving each matrix in the
stack one position towards the top of the stack matrix is glMatrixMode().
Dept. of CSE, RRCE 2022-2023 13
5.6 RUNNING THE PROGRAM

After all the setup is completed, GLUT programs enter an event processing loop,
glutMainLoop ().
void glutMainLoop(void) enters the GLUT processing loop, never to return.
Registered callback functions will be called when the corresponding events instigate
them.

Dept. of CSE, RRCE 2022-2023 14


CHAPTER 6
SNAPSHOTS

FIG 1 : START MENU

FIG 2 : HELP

Dept. of CSE, RRCE 2022-2023 15


FIG 3: PROJECTING DOWNWARDS

FIG 4: PROJECTING UPWARDS

Dept. of CSE, RRCE 2022-2023 16


FIG 5 :TRICOLOR IS BEING DISPLAYED THROUGH SMOKE FUNCTION

Dept. of CSE, RRCE 2022-2023 17


CONCLUSION

After the completion of this project we came to know how we can implement a
project using an Open source OpenGL tool kit. By implementing a project using Open
GL we came to know how to use the functions like menu‘s, rotation, translation and
scaling. With the completion of this project we have achieved a sense of happiness and
we want to thank all those who helped us directly or indirectly to make this idea come
true.

This project can be used for simulation of Republic Day air shows to avoid accidents
happening during training by scaling the airplanes in a screen of 1366x768 and using
a multiplying factor to check the pattern of air show in real life.

Dept. of CSE, RRCE 2022-2023 18


BIBILIOGRAPHY

We have obtained information from many resources to design and implement our
project successfully. We have acquired most of the knowledge from related websites.
The following are some of the resources:

[1]. Edward Angel, Interactive Computer Graphics A Top-Down Approach with


OpenGL, 5th Edition, eddison-Wesley, 2008.

[2]. F.S. Hill,Jr, Computer Graphics Using OpenGL. 2nd Edition, Pearson
Education, 2001.

[3]. James D Foley, Andries Van Dam, Steven K Feiner, John F Hughes, Computer
Graphics –Addison-Wesley 1997.

[4]. Donald Hearn and Pauline Baker, Computer Graphics - OpenGL Version –2nd
Edition, Pearson Education, 2003.

[5]. http://www.opengl.com

[6]. http://www.google.com

Dept. of CSE, RRCE 2022-2023 19


Dept. of CSE, RRCE 2022-2023 20

You might also like