# Analytic Geometry: Point coordinates, same distance from two points

Given are two points, $P1(x_1, y_2)$ and $P2(x_2, y_2)$, and distance $a$. Now I want to find the two points $T1$ and $T2$.

$$d(P1,T1) = d(P2, T1) = a = d(P1,T2) = d(P2, T2)$$

Eg: (T1 and T2 are my two points I want to find)

           T1
/|\
len = a / | \ len = a
/  |L \
P1 ------ P2
\  |  /
len = a \ | / len = a
\|/
T2


len = a The distance between the points is given (they are all the same ($a$))
L Angle of 90 degrees.

I've been trying to solve this equation for an hour. I need this for an application, so I need an abstract formulla, in which I can insert the given $x_1, y_1, x_2, y_2$.

Thanks

-
Note that $a$ has to be greater than $\frac{1}{2}d(P_1,P_2)=\frac{1}{2}\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$, otherwise the points $T_1$ and $T_2$ will not exist (or if it equals this quantity, the points $T_1$ and $T_2$ will be identical). – Zev Chonoles Jul 10 '11 at 18:04

The point at the centre of the diagram has coordinates $(x_1+x_2)/2$ and $(y_1+y_2)/2$. The distance $d$ from each of $P_1$ and $P_2$ to the centre is half the distance between $P_1$ and $P_2$, so $d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}/2$. Then the distance $h$ from each of $T_1$ and $T_2$ to the centre follows by Pythagoras: $h=\sqrt{a^2-d^2}$. The vector with components $y_2-y_1,x_1-x_2$ is orthogonal to the line $P_1P_2$ and thus points along the line $T_1T_2$. Thus you just have to add $\pm h$ times a normalized version of that vector to the centre to get $T_1$ and $T_2$:

$$\begin{eqnarray} T_{1,2} &=& \frac12\left({x_1+x_2\atop y_1+y_2}\right)\pm\frac{\sqrt{a^2-\frac14((x_2-x_1)^2+(y_2-y_1)^2)}}{\sqrt{(x_1-x_2)^2+(y_2-y_1)^2}}\left(y_2-y_1\atop x_1-x_2\right) \\ &=& \frac12\left({x_1+x_2\atop y_1+y_2}\right)\pm{\sqrt{\frac{a^2}{(x_2-x_1)^2+(y_2-y_1)^2}-\frac14}}\left(y_2-y_1\atop x_1-x_2\right) \end{eqnarray}$$

-
What does it mean when we put two statements in brackets? Like you did in front of and at the end of the equation. – Martijn Courteaux Jul 10 '11 at 18:25
Aha! Got it. It are vectors. – Martijn Courteaux Jul 10 '11 at 18:28
@Martijn: This is a notation for vectors -- the vector $$\left(x_1+x_2\atop y_1+y_2\right)$$ represents the point with Cartesian coordinates $x_1+x_2$ and $y_1+y_2$. See also en.wikipedia.org/wiki/Vector_notation#Matrix_notation (where they use square brackets instead). – joriki Jul 10 '11 at 18:28

Another way of looking at it:

1. Knowing the coordinates $(x_1,y_1)$ and $(x_2,y_2)$, it is easy to construct the equation for the perpendicular bisector of the segment joining those two points:

$$\frac{y-\frac{y_1+y_2}{2}}{x-\frac{x_1+x_2}{2}}=-\frac{x_2-x_1}{y_2-y_1}$$

1. The perpendicular bisector also intersects the circles of radius $a$ centered at the two given points, $(x-x_1)^2+(y-y_1)^2=a^2$ (and similarly for the other circle).

If you solve these two simultaneous equations (you only need to pick one of the two circles), you should obtain the same results as in joriki's answer.

-