How do you plot vectors between two start and end points along a sphere?

72 Views Asked by At

I have two Vectors on a sphere, and I am trying to figure out how to plot points along a curve between the two Vectors at an arbitrary distance between the two. I know the position of the start and end Vector, as well as the radius of the sphere. Can anyone help me formulate and come to an understanding of the equation I would or could use to achieve plotting these points? I looked into the great circle distance, but was unsure how to get more than just the distance from the equation, as I want to plot objects along this course. I have included an image for reference, of what I am trying to achieve. Thanks in advanced for any help and understanding that you may be able to provide!

Rough sketch of what I am trying to achieve

1

There are 1 best solutions below

0
On

Given two unit vectors $p_0$ and $p_1$, $|p_0|=|p_1|=1$, such that if $c:=p_0\cdot p_1$ then $|c|\ne 1$, compute $q:=p_1-c\:p_0$, and third point $p_2:=q/|q|$. We have now $p_0\cdot p_2=0$ and $|p_2|=1$. The circle passing through the three points is given by $p:=\cos(\theta)p_0+\sin(\theta)p_2$ where the angle $\theta=0$ for $p=p_0$, $\;\theta=\pi/2\;$ for $p=p_2,\;$ and $c=\cos(\theta)$ for $p=p_1$.

Another approach is to use linear interpolation and then normalize to a unit vector, similar to the comment about $\texttt{ Slerp()}$. Let $0\le t\le 1$, $q:=(1-t)p_0+tp_1$ and $p:=q/|q|$ is the new point.