"Dijkstra's Algorithm" Press up key to see simulation again.
Kinetic Simulation of Dijkstra'a algorithm
It states that we can find the shortest path between any pair of nodes by considering all the nodes to be balls connected by threads of length equal to the weight of the path among them.Then if we hold the source ball on top , the rest of the balls will fall at a distance d below the source, which will also be equal to the shortest path between them.
The code is written in javascript and can be found at www.github.com/hkirat/dijkstra.
You can change the neighbours and the weight of the edges to see simulation for a different case.