[Math] Shortest distance between two points on the surface of a closed cylinder

3dcurvesdifferential-geometrygeometrysolid-geometry

What is the shortest distance between two points on the surface of a closed cylinder? I understand simple euclidean distance will work if both points are on curved surface, but I am looking for a generic solution where one point can be on the curved while other might be on the top/bottom surface.
The parameters we have for point(say A) is its distance from the top of cylinder, and for point B is – its distance from top of the cylinder and angle subtended with the other point along the circumference of cylinder and the centre point of cyclinder.

Best Answer

Let me try to help with expressing your problem. The following is related:

Find minimum distance between two points on a cylinder, one on the top flat surface $A$ (not its circle center) and another point $B$ on its curved surface.

EDIT1:

$$ AO=a\,;\angle AOQ =\alpha; AOP =\theta; \, QB= z ; $$

The problem is best formulated using development of the cylinder curved surface.

Given $(r,\alpha, a,z) $ you want to minimize total length

$$ AP +PB = \sqrt{a^2+r^2-2 a r \cos \theta} +\sqrt{z^2+r^2( \alpha-\theta)^2 }\tag1$$

enter image description here

This should be differentiated w.r.t $\theta$ and set to zero leading to :

$$ \frac {a \sin \theta}{r (\alpha-\theta)} = \sqrt{\frac {a^2+r^2-2 a r \cos \theta}{z^2 +{r^2( \alpha-\theta)^2 }} }\tag2$$

which should be solved. A numerical solution can be attempted as it is a transcendental equation having no closed form solution.

A minimum is seen somewhere in the middle $\theta \approx 0.86$ angle in domain for values assumed $(a,r,\alpha,z)=(.5,1, \pi/2,1.25 ) $ where $ \theta $ is on x-axis and total length of two line segments $ APB$ on y-axis.

enter image description here

EDIT2:

It is instructive here to mention geodesics in 3D. Label the vertex opposite to $Q$ as $C,$ to make $ PQBC $ a rectangle. Now the point $P$ should move such that line $APB$ should be straight for minimum length, or in other words

$$\boxed{ \angle APO= \angle BPC = \psi } \tag3 $$

$$ \sin \psi =\frac{a \sin \theta}{\sqrt{ z^2 +r^2( \alpha-\theta)^2 }} =\frac{r( \alpha-\theta) } {\sqrt {z^2 + r^2( \alpha-\theta)^2 } } \tag4 $$

Minimum distance from axis to line on flat top surface is the Clairaut constant for surfaces of revolution. $$ = a \sin \psi \tag5 $$

It is thus seen that the surface of revolution can have abrupt change in slope needing no smoothness and continuity.