Home▸Algorithms & AI▸Bellman-Ford Relaxation Rig: Shortest Paths with Negative Weights in 3D

Bellman-Ford Relaxation Rig: Shortest Paths with Negative Weights in 3D

Watch Bellman-Ford relax every edge of a weighted directed graph, pass after pass. Distance estimates grow as columns on pedestals, the amber pipe is the edge under test, cyan pipes form the shortest-path tree, and a reachable negative cycle is traced in red. Change the graph, the scanning order, a global weight shift and the source vertex, with live relaxation counts and numerical checks against Floyd-Warshall and Dijkstra. Board, pedestals and flag modelled in Blender.

Algorithms & AI3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Bellman-Ford Relaxation Rig: Shortest Paths with Negative Weights in 3D ↗ Open standalone

Watch Bellman-Ford relax every edge of a weighted directed graph, pass after pass. Distance estimates grow as columns on pedestals, the amber pipe is the edge under test, cyan pipes form the shortest-path tree, and a reachable negative cycle is traced in red. Change the graph, the scanning order, a global weight shift and the source vertex, with live relaxation counts and numerical checks against Floyd-Warshall and Dijkstra. Board, pedestals and flag modelled in Blender.

⚙ Under the hood

Watch Bellman-Ford relax every edge of a weighted directed graph, pass after pass. Distance estimates grow as columns on pedestals, the amber pipe is the edge under test, cyan pipes form the shortest-path tree, and a reachable negative cycle is traced in red. Change the graph, the scanning order, a global weight shift and the source vertex, with live relaxation counts and numerical checks against Floyd-Warshall and Dijkstra. Board, pedestals and flag modelled in Blender.

Bellman-FordShortest PathGraph AlgorithmsNegative CycleEdge Relaxation

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)