This project focuses on the task of creating a UI for visualizing traffic flow in a city(a road network) using OpenGL. The problem of traffic congestion has seen different types of approaches from using simple heuristics to complex machine learning based approaches to predict correct traffic signals in a road network. This project does not aim to solve the traffic congestion problem but serve as a tool to help solving the aforementioned problem.
We will be using OpenGL to render a city and its various components. Elaborating on the previous line , we will create models in C++ using OpenGL to simulate objects like roads, cars, traffic signals, road junctions etc . The UI will be able to read object meshes provided by user for models. All this can be modeled in OpenGL without significant efforts , but the important part is to integrate the UI with the visual platform for e.g. rendering turns on roads as realistically as possible(using curve interpolations). The UI will be as simplistic as possible for usage. This means that the user will be able to provide the road network in the form of a road network file or a more graphical format. The major part of the project will be on creating a crude UI developed at first and then adding extra features. For example possible additions could be -
-
Allowing widely varying dimensions of vehicle models
-
Check for collisions and abort with proper messaging or feedback.
To compile the project, use the command:
make clean;
make;
There would be two executables present in ./bin
- input
For creating the road network and assigning the source and the destination for the cars. - output
Rendering the road Network and animating the Traffic flow.
-
-
Can be used to look-around the model from one-place. At the start of the program the cursor is snapped to the center of the screen.