edge under testrelaxedshortest-path treenegative cycle
Couldn't start the 3D scene.

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.

Made with 🟠 Blender · Three.js