Plotting a vector in 3D space between two points on a ellipsoid

104 Views Asked by At

Sorry in advance if this is a trivial question. I am trying to draw a curve between three points on a globe. I have the math for drawing the curve figured out, what I need help with is figuring out how to find the middle vector of my curve that I want to draw (The curve should start at the earth, go into space, then come back down to another point on the earth). I know the start and end point, I know the vector for where the earths center is and the radius of the earth in the simulation. I also know the middle vector between the start and end points in a straight line. How do I go about finding the point in space at some arbitrary distance from the earths center that is greater than the radius of the sphere? I drew a quick image of what I am trying to achieve.

Sample image I drew of what I am trying to achieve

1

There are 1 best solutions below

0
On BEST ANSWER

The unit vector going the direction of $C$ is

$$ \hat{C} = \frac{\bf C}{|{\bf C}|} $$

To get ${\bf E}$ you just need to scale $\hat{C}$ by the amount you need

$$ {\bf E} = r\hat{C} $$