'How should I calculate an entry-path from orbit, in 3D?
We can disregard aspects such as gravity, velocity and time. What I'm really looking for is a general concept of how to get from an Origin to a Destination in a manner that curves "nicely" around a point P with radius r. For what it's worth, we need to do this in both C++ and in Python, but I'm more interested in concepts than in actual code.
Here is a beautiful drawing I made in Paint:
This is what we're looking to achieve, represented in 2D.
We need a path from Origin to Destination that does not cross the area of P.
The last bit of entry would preferably be somewhat angled towards P such as in the image above, rather than being "glued" tightly to the "surface" like this:
(Although this can be solved (faked) by moving our destination away from the surface of P and rather splice it with another path to do the last part of entry to the surface, but we were hoping to avoid that)
In addition, we're hoping to ensure that the path always gets closer to the surface of P. By this I mean that the path never moves close to P - then curves away - then back in. Like this:
We've been looking into Bezier curves. We tried "projecting" any 3D scenario to 2D and then add bezier curves just as in the images I've provided, then project it back into 3D, which is mostly working, but sometimes not.
We're struggling to calculate the control points to always fit our needs. We feel like there should be some calculation that is based on all three points of interest (and the radius of P), but we can't find it.
So the question is - is it possible to ensure everything I mention by using 2D Bezier curves? I also very much welcome completely different approaches and ideas. In the end, we actually need the path to be an array of points in "world space", rather than a single path of some kind, but this is easily converted. Performance/efficiency is not important.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|



