[Math] Directions in spherical coordinates

spherical coordinatesspherical-geometry

Say I have a system with standard spherical coordinates. There's a man on that sphere and he's standing on the equator facing east. He chooses a random angle $0°-360°$ and turns that much in the clock wise direction. Then he starts walking. Assuming his body is always perpendicular to the surface, he should always make a full circle and come back to where he started if he keeps on moving, right?

Now the question is, if I know his current location and I know the random angle, how do I compute where his next location is in spherical coordinates? By next location I mean the coordinates he has when he takes another step. A step always moves him by a set amount of arc length.

Best Answer

Geodesics on the sphere are great circles, and a great circle is the intersection of a plane which passes through the centre of the sphere with the surface of the sphere.

In the general case (i.e. the random angle isn't a multiple of $90^\circ$), the man will cross the equator on the antipode of his starting point, because the intersection of the plane in which the equator lies with the plane of the circle he follows is a line passing through the centre of the sphere.

Suppose that his angle is between $0$ and $180^\circ$. Then he starts by going south of the equator, reaches a furthest point south after a quarter of his journey, carries on moving back to the equator and reaching it at the halfway point, etc. So for any latitude between the equator and the southmost point, he passes through two points at that latitude. This is why we need to know the starting point: without that, we don't know whether the current point is the first or the second point at that latitude which he reaches.

Given the start point and the angle, you can parameterise the great circle, and then given the current point you can calculate the current value of that parameter with arc-tan and quadrant considerations. You can also calculate the great circle distance between the start point and the current point by taking the arc-cos of their dot product, and you can extrapolate using SLERP.

Related Question