← Back to Labs
Geodesic Shortest Path
Dijkstra's algorithm on a weighted terrain — distance wavefronts propagate
Click canvas to set start point
Click to set start. Shift+click to set end and find path. Right-click to add obstacles.
Dijkstra's algorithm (1959) finds shortest paths in a weighted graph. Here each grid cell has a traversal cost proportional to terrain height. The algorithm expands a wavefront outward from the source — cells closer in weighted distance are settled first. On curved surfaces (Riemannian manifolds), geodesics satisfy the geodesic equation d²xᵏ/ds² + Γᵏᵢⱼ (dxⁱ/ds)(dxʲ/ds) = 0.