I’ve created a planet, am dynamically placing “cities” all around the surface, and am dynamically drawing raised curves between them, like flight paths. I’m plotting quadradic Bezier curves for each of these flight paths, with start point (A) and end point (D) on the surface of the planet, and two control points (B)(C) midway. I’m also calculating the distance across the surface between point (A) and (D), because I suspect I’ll need that. So far so good.
The problem is that I need to dynamically calculate the “height” of the two control points B and C. The height can’t just be a constant, say “PlanetRadius * 1.5”, because for cities near one another, 1.5 is way too high, while for cities that are half-way around the planet from each other, 1.5 isn’t nearly high enough to clear the curvature of the planet. Ideally, the flight path at it’s high points would be drawn ~10% higher than the radius of the planet, but because it’s a bezier curve, the control points (B)(C) sit higher than the plotted curve itself.
Hopefully that makes sense. Any ideas?