Finding location of a point on 2D plane, given the distances to three other know points

essentially you are solving the following equation in $x_0$ and $y_0$:

$$\begin{cases}(x_0-x_1)^2+(y_0-y_1)^2=d_1^2 \\ (x_0-x_2)^2+(y_0-y_2)^2=d_2^2 \\ (x_0-x_3)^2+(y_0-y_3)^2=d_3^2\end{cases}$$

solving only the first 2 will give you 0, 1 or 2 solutions for which you can select the correct one from the third equation

with the formulas taken from http://paulbourke.net/geometry/2circle/

if $|S_1S_2|> d_1+d_2$ or $|S_1S_2|< |d_1-d_2|$ then there are no solutions and if $S_1=S_2$ and $d_1+d_2$ then all the points on the entire circle are solutions

and with $a=\frac{d_1^2 - d_2^2 + |S_1S_2|^2 }{ 2 *|S_1S_2| }$ and $h^2 = d_1^2-a^2$we have

$$\begin{cases}x_0 = x_1 \pm h*\frac{ y_2 - y_1 }{|S_1S_2|}\\ y_0 = y_1 \mp h*\frac{ x_2 - x_1 }{|S_1S_2|}\end{cases}$$

as possible solutions insert these into the third equation and eliminate the one that doesn't fit


The point $(x_0,y_0)$ is on three circles, with equations $$C_i(x,y)=0, \qquad i=1,2,3,$$ where $$C_i(x,y)=(x-x_i)^2+(y-y_i)^2-d_i^2.$$ For a point $(x,y)$ to be on the first two circles, we must have $C_1(x,y)=C_2(x,y)$. Expand and simplify. We get a linear equation.

Similarly, we have $C_2(x,y)=C_3(x,y)$. Expand and simplify. We get another linear equation.

We now have a system of two linear equations in two unknowns. Solve for $x$ and $y$.

Note that bad things can happen. If we put down points and distances "at random" it is quite likely that there will be no point $(x_0,y_0)$ that satisfies your conditions. In certain fairly rare cases, there may be more than one point that satisfies your conditions.

Details: The point $(x_0,y_0)$ is distance $d_1$ from $(x_1,y_1)$. So $(x_0,y_0)$ is on the circle with centre $(x_1,y_1)$ and radius $d_1$. This circle has equation $$(x-x_1)^2+(y-y_1)^2=d_1^2.$$ This equation expands to $$x^2+y^2-2x_1x-2y_1y +x_1^2+y_1^2-d_1^2=0.$$ Similarly, $(x_0,y_0)$ lies on the circle with equation $$x^2+y^2-2x_2x-2y_2y +x_2^2+y_2^2-d_2^2=0.$$ When we set the two left-hand sides equal to each other, the $x^2$ and $y^2$ terms cancel, and we arrive at the linear equation $$2(x_2-x_1)x +2(y_2-y_1)y +x_1^2-x_2^2+y_1^-y_2^2 -d_1^2+d_2^2=0.$$ This is a linear equation in $x$ and $y$. When the two circles intersect in two points, it is the equation of the line through these two points.

In the same, we obtain a second linear equation in $x$ and $y$, that is, the equation of (we hope) another line. Then $(x_0,y_0)$ lies on both lines, so can be easily found.

It is possible that the two lines will be the same. This happens when the points $(x_i,y_i)$ all lie in one line (are collinear). In that case, all is not lost. Use one of our linear equations to solve for $y$ in terms of $x$, and substitute in the equation of one of our circles. After a while, we get a quadratic equation in $x$. Solve. In general there will be two solutions, and thus two possibilities for $(x_0,y_0)$, symmetric about the line that contains our points $(x_i,y_i)$ ($i=1,2,3$). A sketch shows that we cannot do any better, for when our three points are collinear, there are in general two possibilities for $(x_0,y_0)$.


An Alternative to Circles

Since you should get the same answer as with circles, you wind up the same.

The way I understand the original question:

GIVEN:

  • 3 arbitrary points (x,y) that are not colinear. I emphasize that the X and Y coordinates for all three points are known.

  • 3 distances from the 3 arbitrary points

  • The fact that the three distances (line segments) share one common point. But we are not given the coordinates of that point.

  • We also know the other end of each line segment is one of the 3 arbitrary, non-colinear points. And we even know which segment (distance) goes with each point.

SOLVE:

Calculate the X and Y coordinates of the one common point.

HOW:

First, for the sake of thinking, change the problem. Instead of finding the unknown X,Y of the common point, assume that unknown to be THE KNOWN. And the three distances are 3 UNKNOWNS for which you will solve. This invented problem is easy for you because you know how to calculate the distance between any two cartesian points (X0, Y0) and (X1, Y1) and the Pythagorean theorum namely:

Distance d between two points (X0, Y0) and (X1, Y1): d = square_root ((X1 - X0) ^ 2) + ((Y1 - Y0) ^ 2))

Now, switch back to the real problem because you have your relevant formulae. Let the distances be the knowns and the common point (X1, Y1) be the unknown and represented as (X,Y). Let the *k***nown point be represented as **(Xk, Yk). Solve for X and Y.

After some algebraic manipulations, I think you can get this for each distance:

y = Yk +- square_root (d^2 - X^2 + 2 * X * X + X^2)

where

+- means plus or minus

^ means the power symbol, such as X^2 meaning X squared

Since you have three different distances, and known points, you have this equation for each. Hence, you have three equations to solve for the two unknowns. "But I thought the rule is you need 2 equations to solve for 2 unknowns." Here you need 3 equations to solve for 2 unknowns because you have a square root.

In the original problem, intuitive was you need three known reference points and three distances to determine a unique point. Our three equations work like this:

Use any one, you get a curve.

Use any two, you get two points. Two curves can intersect in two points. It's straight lines that can only intersect in one point. We can get 2 answers because we are taking a square root.

You need all three equations to solve for these two unknowns X and Y.

I have not provided the complete answer. Essentially the same method which (unless something changed) you can find someone else previously posted in this thread. I have explained it more.