CGV Final1
CGV Final1
CGV Final1
UNIVERSITY BELAGAVI
AJAY N 4AL19CS005
AKHILESH HERKAL 4AL19CS006
Mrs. Pranitha
Assistant Professor
CERTIFICATE
This is to certify that the Mini Project entitled Toll Collecting Using OpenGL has been successfully
completed by
AJAY N 4AL19CS005
AKHILESH HERKAL 4AL19CS006
the bonafide students of Department of Computer Science & Engineering, Alva’s Institute
of Engineering and Technology in DEPARTMENT OF COMPUTER SCIENCE &
ENGINEERING of the VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI
during the year 2021–2022. 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 Bachelor of Engineering Degree.
External Viva
1.
2.
ALVA’S INSTITUTE OF ENGINEERING AND TECHNOLOGY
MIJAR, MOODBIDRI D.K. -574225
KARNATAKA
Declaration
We,
AJAY N
AKHILESH HERKAL
hereby declare that the dissertation entitled, Alva’s Event Management is completed and
written by us under the supervision of my guide Mrs. Pranitha, Assistant Professor,
Department of Computer Science and Engineering. Alva’s Institute of Engineering And
Technology, Moodbidri, DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
of the VISVESVARAYA TECHNOLOGICAL UNIVERSITY, BELAGAVI during the
academic year 2021-2022.The dissertation report is original and it has not been submitted
for any other degree in any university.
AJAY N 4AL19CS005
AKHILESH HERKAL 4AL19CS006
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany a successful completion of any task would
be incomplete without the mention of people who made it possible, success is the epitome
of hard work and perseverance, but steadfast of all is encouraging guidance.
So, with gratitude we acknowledge all those whose guidance and encouragement
served as beacon of light and crowned the effort with success.
The selection of this mini project work as well as the timely completion is mainly
due to the interest and persuasion of our mini project coordinator Mrs. Pranitha,
Assistant Professor, Department of Computer Science & Engineering. We will remember
his contribution forever.
We thank our beloved Principal Dr.Peter Fernandes, for his constant help and
support throughout.
Also, we thank all the teaching and non-teaching staff of the Department of
Computer Science & Engineering for the help rendered.
AJAY N 4AL19CS005
AKHILESH HERKAL 4AL19CS006
i
ABSTRACT
The main idea behind this project is to display the concept of a toll collecting
booth with computer graphics. This graphics package is based on the OpenGL library
functions. The programming language used here is C using OpenGL libraries.
The idea behind this project is to display the concept of toll collection booths
through computer graphics. This project will include a toll collecting booth where as soon
as the car comes the barrier is imposed. This barrier will then be lifted by the user.
There will be a two-way path in at both ways we have at toll collecting booth for
both directions. To open the left side barrier we use to press ‘L|l’ key, as soon as the key
is pressed the left side car will move. And in the same way, we have ‘R|r’ key to open the
barrier and allow the car to move further.
ii
TABLE OF CONTENTS
iii
List of Snapshots
Page No
1. Snapshot 5.1.1 9
2. Snapshot 5.1.2. 10
3. Snapshot 5.1.3 10
4. Snapshot 5.1.4 11
5. Snapshot 5.1.5 11
6. Snapshot 5.1.6 12
iv
Toll Collecting Using OpenGL
Chapter 1
INTRODUCTION
This chapter gives brief introduction about computer graphics, the features of glew
and glut and binary search tree.
Computers have become a powerful tool for the rapid and economical production
of pictures. There is virtually no area in which graphical displays cannot be used to some
advantage, and so it is not surprising to find the use of computer graphics so widespread.
Although early applications in engineering and science had to rely on expensive and
cumbersome equipment, advances in computer technology have made interactive
computer graphics a practical tool. Computer graphics are pictures and films created using
computers. Usually, the term refers to computer generated image data created with the
help of specialized graphical hardware and software.
1.2 OPENGL
1.3 GLUT
The OpenGL Utility Toolkit (GLUT) is a library of utilities for OpenGL programs, which
primarily perform system-level I/O with the host operating system. Functions performed
include window definition, window control, and monitoring of keyboard and mouse input.
Routines for drawing a number of geometric primitives (both in solid and wireframe
mode) are also provided, including cubes, spheres and the Utah teapot. GLUT also has
some limited support for creating pop-up menus.
1.4 FREEGLUT
1.5 GLEW
Chapter 2
REQUIREMENT ANALYSIS
2.1 Project Requirements
The package is designed such that users with a computer having minimum configuration
can also use it. It doesn’t require many complex graphics packages.
The package requires simple in-built functions found in the Freeglut library. Some
basic functions found in the graphics package of Codeblocks compiler have also been
used.
Hardware Requirements
The minimum requirements are
A computer with 333 MHz processor.
32 MB SD/DDR RAM.
100 MB of Hard disk space.
Monitor resolution - A color monitor with a minimum resolution of 640*480.
Opengl Functions
Data structure in cpp.
Object Oriented Concept
C++
Chapter 3
PROJECT DESIGN
The idea behind this project is to display the concept of toll collection booths
through computer graphics. This project will include a toll collecting booth where as soon
as the car comes the barrier is imposed. This barrier will then be lifted by the user. There
will be two way path in at both way we have at toll collecting booth for both direction. To
open the left side barrier we use to press ‘L|l’ key, as soon as the key is pressed the left
side car will move. And in the same way, we have ‘R|r’ key to open the barrier and allow
the car to move further. Here we also we can increase or decrease the speed of the cars by
using proper keys.
MENU FUNCTION: It creates the main and the sub-menus, whereas the main menu is to
“Quit, increase the size and decrease size” of the objects. And sub-menus are used for color.
The menu is assigned to mouse click when the mouse (LEFT or RIGHT) button is pressed the
menu will appear and action is performed.
This flow Diagram shows the represents the display, keyboard, init, reshape, and mov. In under display
there are several subsections, they are welcome, frontscreen and color section. In under Welcome
section there are drawstring, drawstring1, drawstring2.
Chapter 4
IMPLEMENTATION
This section gives information regarding the user defined functions and GLUT
functions used in the project.
4.1 Code
// car3
//color();
color();
glBegin(GL_QUADS);
glVertex2f(ax + 140, cy1);
glVertex2f(ax + 190, cy2);
glVertex2f(ax + 190, cy3);
glVertex2f(ax + 140, cy4);
glEnd();
glBegin(GL_QUADS);
glVertex2f(ax + 130, cy5);
glVertex2f(ax + 200, cy6);
glVertex2f(ax + 200, cy7);
glVertex2f(ax + 130, cy8);
glEnd();
glBegin(GL_QUADS);
glVertex2f(ax + 140, cy9);
glVertex2f(ax + 190, cy10);
glVertex2f(ax + 190, cy11);
glVertex2f(ax + 140, cy12);
glEnd();
//wheel
glBegin(GL_QUADS);
glColor3f(0.0, 0.0, 0.0);
glVertex2f(ax + 135, cy13);//lft cr btm
glVertex2f(ax + 140, cy14);//lt wel
Chapter 5
RESULT
This section includes the snapshots of the possible test cases of the project and its
details.
5.1 Snapshots
The page shows the front screen which is having the details of the student names
and professor name of under the guidance of implementation.
This page shows that After paying toll car BMW went and the next car is waiting to pay
the toll, After paying the toll right-side barrier opened and NANO car passing.
This page shows as soon as we pay the toll the barriers will open and cars will move from both
sides.
This page shows that after all the implementation there is again a continues assemble of vehicle
can be viewed.
Chapter 6
CONCLUSION
There will be a two-way path in at both ways we have at toll collecting booth for
both directions. Toll Collection technologies and its impacts on transport sectors in
developing countries like Bangladesh. This paper initially includes the identified relevant
technologies of ETC that used in many developed countries. Toll collection systems
provide a great advantage over the conventional systems. Even though there is some
privacy concerns, Electronic toll collection systems have far greater advantages when it
comes to increase revenue, operating and economic cost and improved air quality.
Page 13
Dept. of CSE, AIET, MOODBIDRI
REFERENCES
Textbooks Referred
Donald Hearn & Pauline Baker: Computer Graphics with OpenGL Version,
3rd / 4th Edition, Pearson Education, 2011
Links Referred
https://learnopengl.com/Getting-started/OpenGL
https://www.geeksforgeeks.org/binary-search-tree-set-1-search-and-
insertion/