Algorithm Visualization
04- Tags
- Year
- 2023
- Tools
For a data structures and algorithms project at the University of Florida, the brief was simple: visually compare two pathfinding algorithms. I set Dijkstra's algorithm and A* loose on the real street networks of Rome and New York, then rendered every step of their search as an animation.
Rather than plotting the algorithms on an abstract grid, I pulled each city's streets from OpenStreetMap, so the comparison would play out on roads a viewer could recognize. The pathfinding ran in Python on latitude and longitude to keep its distances accurate, so I wrote an algorithm that reverses the Mercator projection's warp, flattening those coordinates for an undistorted map. The de-warped data then went to Blender's Python API, which turned each step into geometry, lighting every street the moment an algorithm explored it. A dim, monochromatic map lets the cyan glow carry the story: Dijkstra's spreads out evenly in every direction, while A* reaches for its destination and leaves most of the city dark. I rendered the frames individually and sequenced them in Premiere, slowing the much faster A* search so viewers could follow it.
PORTFOLIO
The finished video has drawn more than 189,000 views on YouTube, a significant audience for a class project, and a reminder that a clear visual can make an abstract idea land with people far outside the classroom.