# Position of a point with fixed distance between other two points

I have two points, $p_1$ and $p_2$, in a cartesian plane, and a fixed radius, $r$.

I want to find the coordinates of another point, $p_3$, that is in the same line of the $p_1$ and $p_2$, and always in a fixed distance, $r$, from the point $p_1$.

$(a,b)$       $(?,?)$                      $\quad \quad \quad\space(c,d)$
$p_1$---------$p_3$---------------------$p_2$
$\quad r$

Considering that the points $p_1$ and $p_2$ can be on anywhere in the plane.

This is the problem of finding the point $p_3$$(x,y) that divides the the joint of two points p_1 (a,b) and p_2 (c,d) internally in the ratio r:t\normalsize (i.e. p_1p_3:p_3p_1 = r:t) First you have to find the value of the consequent of the ratio i.e t, for that find the distance of p_1p_2 using this distance formula and then subtract r from it. Thus,$$ t = \left(\sqrt{ (c - a)^2 + (d-b)^2 } \right) -r $$Now you can find$$ x= \frac{rc + ta}{r+t}$$and$$ y=\frac{rd + tb}{r+t}$$- The denominator should be just t – Tapu Nov 25 '11 at 19:08 Sorry, I have removed the down vote now...plz edit your post :) – Tapu Nov 25 '11 at 19:12 @Swapan: Fixed. – Quixotic Nov 25 '11 at 19:14 Do you mean$$ p_1+r\frac{p_2-p_1}{|p_2-p_1|} $$Afterthought: If you're not worried about being on the line segment between p_1 and p_2, then$$ p_1-r\frac{p_2-p_1}{|p_2-p_1|} $$works also. - This is on the line between p_1 and p_2 as long as |p_2-p_1|\ge r. – robjohn Nov 25 '11 at 18:34 Let's define point P_3 as P_3(e,f) . You may calculate coordinates e and f using following equalities : e=\frac{a+\lambda c}{1+\lambda} , and f= \frac{b+\lambda d}{1+\lambda} where \lambda=\frac{r}{|P_1P_2|-r} , and |P_1P_2|=\sqrt{(a-c)^2+(b-d)^2} - Are you sure P_3 lies inside the segment P_1P_2? This means r\le \sqrt{(a-c)^2+(b-d)^2}. In this case the point P_3 is given by$$\left(\frac{a \times (\sqrt{(a-c)^2+(b-d)^2}-r)+c \times r }{\sqrt{(a-c)^2+(b-d)^2}},\frac{b \times (\sqrt{(a-c)^2+(b-d)^2}-r)+d \times r}{\sqrt{(a-c)^2+(b-d)^2}}\right)$$- are you sure about the denominator? – Quixotic Nov 25 '11 at 18:56 @MaX You may wish to edit your answer once more to correct present$t$to$t-r$, or to put the denominator as just$t\$ :) – Tapu Nov 25 '11 at 19:06