Optimal Plane Travel – Spherical Geodesics

Publicado 2021-07-12
The method used here can not be expanded to any arbitrary manifold, as it does not compute the geodesic from a metric tensor. My idea here is that every geodesic between two points on the globe will be a section of the great circle (a circle on the globe that maximizes radius) that passes through the two points. I find this by simply computing the polar coordinates of the points from the equirectangular projection, converting to cartesian coordinates, and linearly interpolating between the points, normalizing the vectors (so that they stick to the sphere, since linearly interpolating will reduce the vector's magnitude). Finally, I convert these new cartesian coordinates back to polar coordinates to be plotted back on the equirectangular map.

You may be thinking, this parameterization of the geodesic is not uniform (as in, the step sizes vary! From being small at the ends, and being large in the middle). You would be right; ideally, I can work out some math to make it more uniform, but if I kept optimizing and never sharing, I'd never share the project. That's why I'm sharing it now, then planning to update this version if I ever get it uniform. My idea so far is to just take the angle between the two points on the sphere, and then find the 1:1 function of the parameter that gives a constant change in angle as I interpolate between the points and normalize. This simplifies the problem to be 2D, which will be a lot easier to work with.