Professional Documents
Culture Documents
Malnad College of Engineering: Hassan - 573 202
Malnad College of Engineering: Hassan - 573 202
ACTIVITY REPORT
ON
“TRAFFIC SIGNALS”
Submitted by,
Name USN
PRIYANKA .R 4MC18CS100
SARA AZIZ 4MC18CS121
SAYEDA FATHIMA AIMANN 4MC18CS123
SHAKUNTALA KOUJALAGI 4MC18CS124
SHILPA B.H 4MC18CS127
Mrs. Nithyashree. R
Assistant Professor,
Dept. of CS&E
The main aim of the Traffic Signal Mini Project is to illustrate the concepts and usage of pre-
built functions in OpenGL. Simulation of a traffic signal is being done using computer
graphics. The car built can be moved using keys and based on traffic signal light the user can
obey the traffic rules. When a vehicle is moving on a road and comes near the traffic signal
the vehicle can be stopped by left click on mouse, that is traffic signal becomes red. The
vehicle starts moving again when signal changes to green, that is when we press right click
on the mouse signal changes to green colour. We have used input devices like mouse and
keyboard to interact with the program.
IMPLEMENTATION
Functions
glClear( ):
Takes a single argument that is bitwise OR of several values indicating which buffer
is to be cleared.
glClearColor():
Specifies the red, green, blue, alpha values used by glClear to clear the color buffers.
GlLoadIdentity( ):
To load the current matrix with the identity matrix.
glMatrixMode(mode):
Sets the current matrix mode, modes can be GL_MODELVIEW, GL_PROJECTION.
glut PostRedisplay( ) :
This call requests that the display callback be executed after the current callback
returns.
Void glutMainLoop():
This function causes the program to enter an event-processing loop.
glTranslatef():
This is used to translate or move the rotation centre from one point to another in three
dimensions.
glRotatef():
This is used to rotate an object through a specified rotation angle