Car Parking Computer Graphics Project in OpenGL Source Code – 18CLS67

 

Car Parking Computer Graphics Project in OpenGL Source Code – 18CLS67

In this project, we will discuss the project to implement Car parking using the OpenGL library. As the OpenGL library has a lot of built-in functions, we can implement this project easily.

Project Description

The aim of this project is to create a 3-D/VIRTUAL CAR PARK. The viewer is allowed to roam around in the parking area and see the cars closely and to drive a car and park it in the car park area. The parking area is surrounded by a number of houses.

First, the coordinates of the car are calculated and then using the OpenGL PRIMITIVES the car is constructed. The PRIMITIVES used are GL_LINES, GL_POLYGON, GL_QUADS, GL_TRIANGLE.

A display list is constructed for each of these objects. These display lists are used every time a car or house has to be constructed. So, to create the 36 cars in the parking lot the “carr_display_list “ is called 36 times from within a loop and is translated each time by suitable values to place them correctly. Similarly, to construct the houses “house_display_list” is called and is suitably translated, scaled, and rotated to place them properly. For the movement of the camera GluLookAt ( )function is used. The controls are:-

UP KEY – > to move the viewer in forward direction.

DOWN KEY – > to move the viewer in the backward direction.

LEFT KEY – > to rotate the camera to the left of the viewer.

RIGHT KEY – > to rotate the camera to the right of the viewer.

T – >top view.

S – > to move away.

W – >to move near.

D – > to move right.

A – > to move left.

Q – >quit.

Screenshots of Car Parking Computer Graphics Project in OpenGL Source Code – 18CLS67

This is the first scene that appears when the program is executed.

First Scene

Subscribe to our YouTube channel for more videos and like the Facebook page for regular updates.

Leave a Comment

Your email address will not be published. Required fields are marked *