EleGeodesic approximates a minimum-length geodesic between given endpoints on a multidimensional manifold (surface). It returns the shortest path found. For a complete description, access Netlib and read comments in source code. EleGeodesic is implemented in Elements Engineering-Scientific Workspace. The latter can plot computed geodesics on 2D surfaces.
Sphere with Geodesic

Torus (elliptical cross section) with Geodesic

Geodesic on helicoid color-coded by mean-curvature showing sign change.

Salient Assemblage with Geodesic

Close-up

Close-up from different view point

Close-up from different view point

Euclidean metric ds=sqrt(dx2+dy2+dz2) on sphere produces a "great circle" geodesic.

Hyperbolic metric ds=|1/z|sqrt(dx2+dy2+dz2) means distance measurement varies inversely with proximity to "equator" plane. It produces a very different geodesic.

EleGeodesic can compute both initial-value and 2-point boundary-value geodesic problems. The above are 2-point problems. The initial-value problem allows multiple self intersections.

And here is the same geodesic plotted in parameter space.

Here is a geodesic trajectory on a torus that never crosses the inner annulus. Also, it is an approximately closed geodesic.

Here is a geodesic trajectory on an ellipsoid color-coded by Gaussian curvature.

EleGeodesic software and its support has contributed to the following applications.
Geodesic slide show covers many interesting aspects of geodesics.
A version of EleGeodesic called Geodes is in the Netlib repository of numerical software administered by Oak Ridge National Laboratory, Mathematical Science Section and AT&T Bell Laboratories.
Geodes can be extended by:
Some of these capabilities are implemented in Elements Engineering-Scientific Workspace.
Geodesic computation can be applied to optimization problems.