Geodesics on a Cone

Suppose you’re sitting on the circumference of the base of a cone. You want to reach another point somewhere along the circumference. What is the shortest path you can take to get there, travelling only on the surface of the cone?

cylindricalTo solve this problem, it’s convenient to use cylindrical polar coordinates. While the coordinate z is preserved, your projection onto the xy plane is not described by the Cartesian coordinates x and y but by \rho and \varphi, where

x=\rho\cos\varphi

y=\rho\sin\varphi

That is, \rho measures your displacement from the z axis and \varphi measures your angular displacement about the z axis.

The first task is to find the expression for a small element of length dS in cylindrical polars. This is only a little more complicated than the expression in Cartesian coordinates, which is

(dS)^2=(dx)^2+(dy)^2+(dz)^2

from Pythagoras’ theorem. We need a similar expression in terms of the differentials d\rho and d\varphi. This could be done properly using the chain rule and lots of partial derivatives, but a geometrical argument is quicker.

We can move in three orthogonal directions: a small distance in the z direction, quantified by dz; a small distance away from or towards the z axis, quantified by d\rho; a small distance around the z axis, quantified by \rho\,d\varphi.

It’s only this last differential that looks different. It measures the distance traversed along an infinitesimal circular arc around the z axis. Using these three differentials we conclude that

(dS)^2=(d\rho)^2+(\rho\,d\varphi)^2+(dz)^2

dS=\sqrt{(d\rho)^2+(\rho\,d\varphi)^2+(dz)^2}

We’re going to choose \varphi as our independent variable, so we can write dS as

\displaystyle dS=\sqrt{\left(\frac{d\rho}{d\varphi}\right)^2+\rho^2+\left(\frac{dz}{d\varphi}\right)^2}\,d\varphi

So if we know the rate at which \rho and z change with respect to \varphi, we can work out how far we move when our angle \varphi changes by d\varphi.

ratioNow we bring in our constraint: we are only allowed to move along the surface of a cone. This means \rho and z are locked in constant ratio:

\displaystyle \frac{\rho}{z}=\tan\theta

The angle \theta measures the opening of the cone. This relation allows us to write everything in dS in terms of \rho and its derivatives:

\displaystyle dS=\sqrt{(1+\cot^2\theta)\left(\frac{d\rho}{d\varphi}\right)^2+\rho^2}\,d\varphi

Since

\sin^2\theta+\cos^2\theta=1,

1+\cot^2\theta=\csc^2\theta

hence

\displaystyle dS=\sqrt{\csc^2\theta\rho'^2+\rho^2}\,d\varphi

where \rho primed is the derivative of \rho with respect to \varphi. Hence the total length of the path is

\displaystyle S=\int_{\varphi_A}^{\varphi_B} dS=\int_{\varphi_A}^{\varphi_B}\sqrt{\csc^2\theta\rho'^2+\rho^2}\,d\varphi

\

To find the smallest value of this integral, we can use the Beltrami identity, derived from the Euler-Lagrange equation, which says that the function \rho that minimises this integral satisfies the differential equation

\displaystyle \sqrt{\csc^2\theta\rho'^2+\rho^2}-\rho'\frac{\partial}{\partial \rho'}\sqrt{\csc^2\theta\rho'^2+\rho^2}=c

where c is a constant. After tidying everything up, this gives us the result

\rho^4=c^2 \rho^2+c^2\csc^2\theta\,\rho'^2

This first-order differential equation is separable, and can be directly integrated after rearrangement:

\displaystyle \rho'^2=\frac{1}{c^2\csc^2\theta}\left(\rho^4-c^2\rho^2\right)

\displaystyle \rho'^2=\frac{\sin^2\theta\,\rho^2}{c^2}\left(\rho^2-c^2\right)

\displaystyle \frac{d\rho}{d\varphi}=\sin\theta\,\rho\sqrt{\left(\frac{\rho}{c}\right)^2-1}

\displaystyle \sin\theta\,(\varphi-b)=\int\frac{d\rho}{\rho\sqrt{\left(\frac{\rho}{c}\right)^2-1}}

Here, b is another constant to be determined by the endpoints of the path. This integral can be solved using the substitution

\rho=c\sec\psi

Here’s how the simplification occurs:

d\rho=-c\sin\psi\sec^2\psi\,d\psi

\displaystyle \sin\theta\,(\varphi-b)=\int\frac{-c\sin\psi\sec^2\psi\,d\psi}{c\sec\psi\sqrt{\sec^2\psi-1}}

\displaystyle \sin\theta\,(\varphi-b)=-\int\frac{\sin\psi\sec\psi\,d\psi}{\tan\psi}

\displaystyle \sin\theta\,(\varphi-b)=-\int d\psi

\sin\theta\,(\varphi-b)=-\psi

Taking the secant of both sides gives

\sec(\sin\theta\,(\varphi-b))=\sec(-\psi)

Since secant is an even function, we can dispense with the minus sign inside its argument. Multiplying both sides by c allows us to substitute \rho back into the equation:

c\sec(\sin\theta\,(\varphi-b))=\rho(\varphi)

\

Before we start celebrating, let’s find values for the constants b and c.

To make our result simpler, let’s say our starting point has coordinates

\rho=\rho_0,\quad\varphi=-\varphi_0

and our end point has coordinates

\rho=\rho_0,\quad\varphi=\varphi_0+2n\pi,\,n\in\mathbb{N}_0

That is, we start and end at the same radius, the radius of the cone’s base, but our start and endpoints subtend a total angle 2\varphi_0. We are always free to jiggle our coordinate axes so that this is true, since the cone is axially symmetric about the z axis.

You’ll notice I’ve defined the endpoint as having angular coordinate \varphi_0+2n\pi, where n is a non-negative integer. I’ve included this extra additive term for fun (!) so that we can stipulate how many times we want to circumvent the cone before reaching the endpoint.

So, our start- and end-point constraints give us the two equations

\rho_0=c\sec(\sin\theta\,(-\varphi_0-b))=c\sec(\sin\theta\,(\varphi_0+b))

\rho_0=c\sec(\sin\theta\,(\varphi_0+2n\pi-b))

The first equation gives us an equation for c:

c=\rho_0\cos(\sin\theta\,(\varphi_0-b))

By equating the arguments of the two secants, we can find the appropriate value  of b:

\varphi_0+b=\varphi_0+2n\pi-b

b=n\pi

We substitute these constants back into our equation for \rho and flip over the secant, giving us

\displaystyle \rho(\varphi)=\rho_0\left(\frac{\cos(\sin\theta\,(\varphi_0+n\pi))}{\cos(\sin\theta\,(\varphi-n\pi))}\right)

That’s more like it! This equation describes how our distance from the z axis varies with angle as we wander around the cone. The name for the path parametrised by this expression is the geodesic.

\

Rather than sketching a graph of \rho versus \varphi, I’m going to show plots of a bird’s-eye view of the cone. This basically shows the shortest path’s projection (or shadow if you like) on the xy plane, by looking down the z axis.

First, let’s see how the geodesic changes as the cone’s opening angle \theta varies.

varythetaacuteThe animation on the left shows how the geodesic varies when the total angle your path subtends in less than 180 degrees.

The main point: the geodesic is generally not along the circumference of the cone’s base. The shortest path allows you to take a shortcut across the circle by moving over the surface of the cone. Let’s look at the limiting cases.

When \theta is 0, the geodesic is a circular arc. Why is this? A cone with zero opening angle is effectively a cylinder. The fastest way to get around a cylinder is a circular arc around the cylinder’s axis of rotational symmetry. I hope this result is intuitive.

When \theta is 90 degrees, the geodesic is a straight line. Why is this? A cone with an opening angle of 90 degrees is a flat plane. The shortest path between two points on a plane is a straight line.

varythetareflexHere’s another animation which shows how the geodesic varies when your total angle your path subtends exceeds 180 degrees.

This is a bit more interesting. As the cone becomes flatter and flatter, the geodesic takes you closer and closer to the vertex of the cone. There is a particular value of \theta for which the geodesic is simply two straight lines – one joins the start-point to the vertex and the other the vertex to the endpoint.

Beyond that, our equation unfortunately explodes.

This is not to say that the geodesic does not exist. It’s just that below a particular value of \theta, the geodesic always comprises two straight lines taking you right through the vertex. When this is the case, \rho is no longer differentiable with respect to \varphi for the following reason.

As you travel along one these geodesics that takes you straight through the vertex, your axial displacement \rho decreases, decreases, decreases, reaches zero and then immediately starts increasing – the gradient of \rho is not defined here. Since we cannot integrate what is not defined, our equation no longer makes sense and gives us negative / infinite values of \rho. But we can just throw away these solutions!

\

Here’s something a bit more interesting. The picture below shows the geodesics for the same start- and endpoints, but with different values of n, the number of times you wrap around the cone.

polygeoAs you can see, the greater the number of turns, the closer the geodesic takes you to the vertex. The maximum number of turns shown here is 4; above this, our equation blows up again. The reason is quite intuitive. If you wanted to go around the cone, say, 100 times, there is no point in tracing out some beautiful conical helix with 100 turns; it is quickest to make a beeline straight for the top of the cone where it is narrowest, pirouette 100 times on the cone’s point and then head straight towards the endpoint. There is no differentiable function of \rho which can describe this path, which is why our equation fails above a certain number of turns.

\

It’s useful to know when our equation won’t work, ie when the geodesic involves passing straight through the vertex. Consider again the equation for \rho as a function of \varphi:

\displaystyle \rho(\varphi)=\rho_0\left(\frac{\cos(\sin\theta\,(\varphi_0+n\pi))}{\cos(\sin\theta\,(\varphi-n\pi))}\right)

This equation will give nonsensical values of \rho if the denominator is less than or equal to zero. So sensible values are only given if the argument of the cosine function is less than \frac{\pi}{2}:

\displaystyle \sin\theta\,(\varphi-n\pi)<\frac{\pi}{2}

Note that this must be true for all values of \varphi, the biggest of which is \varphi_0+2n\pi:

\displaystyle \sin\theta\,(\varphi_0+2n\pi-n\pi)<\frac{\pi}{2}

\displaystyle \sin\theta\,(\varphi_0+n\pi)<\frac{\pi}{2}

For this inequality to be satisfied, none of \theta, \varphi or n may be too large. If this inequality is not satisfied, the geodesic will take you through the cone’s vertex.

One last result of interest: suppose \varphi_0=0. This means your start- and end-points are identical. Then for the geodesic not to take you through the vertex,

\displaystyle \sin\theta\,n\pi<\frac{\pi}{2}

So in the limiting case that your path just takes you through the cone’s vertex, the following equality is true:

\displaystyle \sin\theta\,n\pi=\frac{\pi}{2}

\displaystyle n=\frac{1}{2\sin\theta}

Then for a particular value of the cone opening \theta, the greatest number of times the geodesic can wrap around the cone before passing through the vertex is \frac{1}{2\sin\theta}. This gives us a set of angles

\displaystyle \theta_n=\arcsin\left(\frac{1}{2n}\right)

which tell us the maximum cone opening angle for a particular number of turns.

For example, if you want to find a geodesic that wraps around the cone 100 times without passing through the vertex, the maximum value of the cone opening is

\displaystyle \theta_{100}=\arcsin\left(\frac{1}{200}\right)=0.284^{\circ}

\

This post wouldn’t be complete without some clumsily rendered 3D images.

Here are the geodesics whose projections you saw above.

geod0geod1geod2geod3Here are some geodesics for flatter cones.

geodb geodaThere’s something quite nice about their shape.

\

In the examples we’ve seen for the application of the Euler-Lagrange equation, every extremisation problem has actually been very similar in terms of its Lagrangian. The problem was always to minimise an integral of the form

\displaystyle I=\int f(\bold{r})\,dS

For the case of finding a geodesic, the ‘weight function’ f is equal to one.

For the case of the brachistochrone and the path of a refracted beam, the weight function f was the inverse of some velocity field.

For the case of the catenary curve, the weight function f was proportional to some potential field.

In each case, the integral represented something different, but the maths was very much the same. The examples I’ve given all had friendly, analytic solutions, but they are just the tip of the iceberg – you can solve an enormous range of problems just by changing the function f.

Return to top

One thought on “Geodesics on a Cone

Leave a comment