## Inspiration

Traffic jams, overflowing dustbins, and slow emergency response are real problems in our cities. We were inspired to build a 3D visualization tool that helps city planners "see" these problems in real-time.

What it does

CitySim3D is a real-time 3D simulation of a smart city block.

  • Traffic: A moving "vehicle" shows traffic flow between blocks
  • Waste Management: Colored cubes represent smart bins
  • Safety: Lighting can be toggled to simulate day/night and emergency alerts

Controls: P pause/play, T toggle texture/traffic, S toggle lighting, Mouse drag to zoom

How we built it

We built this using modern OpenGL 3.3 in C++ with GLFW, GLEW, GLM, and FreeImage. The scene uses shader-based lighting and texture mapping. We used transformation matrices for movement: $M_{model} = T \times R \times S$

Challenges we ran into

  1. Linker errors: Manifest and path issues in Visual Studio with spaces in folder names
  2. OpenGL migration: Moving from old fixed-function OpenGL to modern VAO/VBO pipeline
  3. Lighting math: Getting the fragment shader to correctly transform light positions with the modelview matrix

What we learned

How to set up a complete modern OpenGL pipeline, write vertex/fragment shaders, and how 3D visualization can be used to make smart city data more understandable.Inspiration

Built With

Share this project:

Updates

Submission history