Dijkstra’s shortest path algorithm
Properties
It computes the minimum cost path from the seed to every
node in the graph.  This set of minimum paths is represented
as a tree
Running time, with N pixels:
O(N2) time if you use an active list
O(N log N) if you use an active priority queue (heap)
takes fraction of a second for a typical (640x480) image
Once this tree is computed once, we can extract the optimal
path from any point to the seed in O(N) time.
it runs in real time as the mouse moves
What happens when the user specifies a new seed?