Traffic Simulator
What if you could reshape city traffic and see the effects? I built an interactive 3D simulator where you design roads, junctions, and signals, then watch vehicles respond. Explore routes, driver behaviors, congestion, and queues, and compare results across runs. Traffic makes urban systems tangible and lets people test changes.
What happens when traffic becomes something you can touch, manipulate, and experiment with?
Traffic systems are complicated. A single signal change can improve one road while creating a bottleneck somewhere else.
I built an interactive 3D traffic simulator where people can construct road networks, observe individual vehicles, experiment with traffic controls, and see the consequences of their decisions.
## The experience
The simulation takes place on a navigable 3D board. You can orbit around the city, zoom in, inspect vehicles, and modify the road network directly.
Drag roads, junctions, roundabouts, ramps, and bridges into the scene. Adjust signal timings, change traffic density, and run a simulation.
Each vehicle has its own route, physical characteristics, and driving behavior. Click one to see where it’s going, how fast it’s moving, and why it’s waiting.
Change the network and run the simulation again to compare delays, queues, and completed trips.
Designed for desktop browsers.
## Engineering highlights
- Interactive Three.js 3D scene with orbit, pan, zoom, selection, and object manipulation
- Editable road network with placement previews, rotation, replacement, and undo
- Agent-based simulation with eight vehicle types and five driver profiles
- Lane-level geometry, vehicle routing, traffic signals, and congestion responses
- Deterministic fixed-step simulation using seeded randomness
- Comparison of traffic performance across simulation runs
- Separation of simulation logic from rendering and interface code
- Unit tests and automated browser verification
## The idea behind it
I was interested in making a complex system understandable through interaction.
Instead of treating the city as a static visualization, the environment becomes an editable model. Users aren’t merely watching traffic—they can change the rules and discover what happens.
It combines spatial interaction engineering with systems modeling, making cause and effect visible.
one paragraph