The geodesic curve connecting two points on a surface of revolution as a boundary value problem (BVP) can be solved through the Euler–Lagrange (EL) equations . A geodesic starting in a certain direction from a given point on the surface is an initial value problem (IVP) and can be solved through the canonical geodesic (CG) equations . A marching scheme for the latter has been implemented for a torus  and hyperboloid .
For a cone  and pseudosphere , intrinsic properties of geodesics were used that can be generalized to find the geodesic connecting two points on the respective surfaces. However, for engineering applications, it is useful to know the construction from the ground up so that the method can be used for other general surfaces of revolution as, for example, in the many shapes encountered in manufacturing science.
This Demonstration takes up the surface of a cone again and shows the construction of a geodesic as both a BVP and an IVP. Taking two random points on the surface, the BVP curve joining the two points is plotted. With the right initial conditions, the IVP can be made to coincide with the BVP. Moreover, when the cone taper angle is small enough, multiple geodesics can be made to pass between the two points.
Consider a cone where the origin is set to the apex and the positive
axis points to the base. It can be parameterized with radius
and angle θ, the latter measured with respect to some fixed direction perpendicular to the
axis. It has the simple representation
. Our intent is to calculate the geodesic curve from
. Following the nomenclature in , let overscript dots indicate derivatives with respect to any general parameter
, that is,
The partial derivatives on the arc-length of a curve lying on the cone are given by
Suppose a curve lying on the cone joining
is traversed along the curve
. The total arc-length traveling from
can be written as:
The Euler–Lagrange (EL-1,2) equations to solve the geodesic as a BVP for which the arc-length is stationary are given by
is taken as a dependent variable and
as the independent variable, that is, using
in place of
, the expression for
EL-1 yields a trivial solution, namely
, which represent meridians. Meridians are geodesics for all surfaces of revolution [1, 2]. Now in EL-2,
is a constant. Let
, which gives
The differential equation above with the substitution
has the solution
. By substituting the inverse for ϕ, we get the final equation
are known from the boundary conditions
This method can be used for any general surface of revolution, as explained in . The difficulty lies in the differential equation for
which was tractable for a cone. For a power law surface where
, solutions could be found using Mathematica
To obtain the geodesic as an IVP, The canonical geodesic (CG) equations below have been solved with
and primes indicate derivatives with respect to
, the arc-length along that geodesic, that is,
as in .
are related by Λ ρ′2+ρ2θ′2=1
. Therefore, choosing a single parameter
representing the angle of the trajectory in the
, we obtain a unique geodesic about the starting point. The CG
equations above can only be solved using Mathematica
's built-in numerical DE solver NDSolve
due to nonlinearity.
The Demonstration is a golf-like game to illustrate the concepts discussed. Two points corresponding to
are chosen at random on a cone of given slope
. The geodesic as a BVP is constructed for these two points. Then an initial point given by
is chosen. By varying the angle Φ and length
, the geodesic as an IVP is made to pass through the two points
. The two curves coincide, reinforcing the existence of a single geodesic in a small patch.
However, if one continues to play with more random points and varies
, one can see that multiple geodesics can be formed using the IVP going through the points. One can also make a geodesic start and end at the same point.
This procedure resembles golf strokes constituted by
to set the trajectory of the ball moving on the surface of the cone to reach the desired end point. The key difference is that friction and gravity are absent. Indeed, it is shown in  that a particle with mass constrained to move on the cone's surface without friction and gravity would move along a geodesic.
Thus while length-minimizing arcs are part of one geodesic connecting two points, geodesics in general are not length-minimizing curves between two points. The Demonstration also helps you to understand geodesic parallel and polar coordinates .
 E. Kreyszig, Differential Geometry
, New York: Dover Publications, 1991.
 T. J. Willmore, An Introduction to Differential Geometry
, Mineola, NY: Dover Publications, 2012.