Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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$?

share|improve this question
    
How about an intersection of sphere with radius d, and the line segment. (but this is probably not the easiest solution) –  tp1 Feb 3 '12 at 19:44
add comment

1 Answer 1

up vote 4 down vote accepted

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$$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.