Say that I have 2 points in 3 dimensional space specified in Euclidean coordinates $p_0(x_0,y_0,z_0)$ and $p_1(x_1,y_1,z_1)$. How would I go about finding the coordinates of an unknown point that lies on the line segment from $p_0$ to $p_1$ that is a known Euclidean distance $d$ from $p0$?
linear interpolation in 3 dimensions
4
$\begingroup$
3d
interpolation
-
0How about an intersection of sphere with radius d, and the line segment. (but this is probably not the easiest solution) – 2012-02-03
1 Answers
5
Pretty simple you just have to find the vector between the two points
$v=p_1-p_0=(x_1-x_0,y_1-y_0,z_1-z_0)=(x,y,z)$
now since you know the total distance between $p_0$ and $p_1$ (which is $\|v\|$) and the distance to your $p_d$ (which is just $d$):
$p_d=(x_d,y_d,z_d)=p_0+\frac{d}{\|v\|}v$