That is indeed true, and is what I’m working on! What I gave was just a simple (naiive) solution adopted from doing the same thing on a plane, not much else. I’m tinkering with a few coordinate systems and spheroid generation: I want to generate the spheroid by it’s different semiminor axes using ellipsoids with both WGS84, geographic coordinates, geodetic surface normals and so on. I’d also like to be able to approximate paths of the curvature, but that’s of course another multiple solutions problem.
Representing a earth as a sphere is visually fine, and the moon even more so. But lots of other celestial objects are not very spherical at all, just look at phobos.