A 3D simulation of a city built using OpenGL & FreeGLUT, featuring dynamic day-cycle modes and interactive urban elements such as cars, pedestrians, traffic lights, and infrastructure.
-
Day Cycle Modes (5 total):
- ๐ Morning
- โ๏ธ Noon
- ๐ Afternoon
- ๐ Evening
- ๐ Night
-
City Components:
- ๐ซ School
- ๐ณ Park
- ๐ฃ๏ธ Roads & Overbridges
- ๐ Flyovers
- ๐ฆ Traffic lights
- ๐ Cars & moving vehicles
- ๐ถ Pedestrians
-
Dynamic Environment:
- Smooth transitions between day modes
- Animated traffic and pedestrian flow
- Interactive controls to switch views and time of day
- Language: C / C++
- Graphics Library: OpenGL with FreeGLUT
- Rendering: 3D scene rendering with lighting, shading, and transformations
360 degree CITY VIEW/
โโโ bin/ # Compiled files
โโโ obj/ # Object files
โโโ demo.cbp # Code::Blocks project file
โโโ demo.cscope_file_list
โโโ demo.depend
โโโ demo.layout
โโโ main.cpp # Main source code
- Install Code::Blocks IDE (with MinGW/GCC compiler).
- Install FreeGLUT library. ๐ FreeGLUT installation tutorial
-
Clone or Download the repository.
git clone https://github.com/sayantichy/3dCityview_ComputerGraphicsProject
Or download the
.zipand extract it. -
Open Code::Blocks.
-
Go to File > Open โ select
demo.cbp. -
Press Build & Run (F9).
| Key | Action |
|---|---|
1 |
Switch to Morning |
2 |
Switch to Noon |
3 |
Switch to Afternoon |
4 |
Switch to Evening |
5 |
Switch to Night |
โ โ โ โ |
Move camera |
W/A/S/D |
Move within city |
Esc |
Exit program |
3dctvw.mp4
- Add sound effects (traffic, birds, city ambience).
- Expand city with buildings, shops, bus stops.
- Implement AI for cars & pedestrians.
- Add weather effects (rain, fog, snow).