2D calculate position of a point relative to 4 known points I have 4 known points (a square) in 2D space: A: {x:0, y:0}
B: {x:100, y:0}
C: {x:100, y:100}
D: {x:0, y:100}
Then I have a point inside the square. I don't know its location, but I do know the following properties:
P is 50 closer to A than to B.
P is 99 closer to A than to C.
P is 77 closer to A than to D.
P is 49 closer to B than to C.
P is 27 closer to B than to D.
P is 22 farther from C than from D.
How can I calculate it's position in the 2D square?
How does the formula change when I want to calculate it's position in 3D space?
Thanks in advance!
Some additional thoughts. When we take just 1D space and take the same points A and B. Now point P is 50 closer to A then B. We could say PA + 50 = PB. Even though we have 1 equation with 2 unknown, we know that PA + PB = 100. Therefore we know that P is at x=25. Can't we use the same theory in 2D with 3 (or 4) points?
A: The same sort of approach does work in 2D.
Your first condition "P is 50 closer to A than to B" can be written as
$PA = PB - 50$. Let's write $(x,y)$ for the coordinates of the point $P$. Using Pythagoras theorem to calculate the distances $PA$ and $PB$, we get
$$
\sqrt{x^2 + y^2} = \sqrt{(x-100)^2 + y^2} -50
$$
Your other conditions give similar equations, and the resulting set of equations can be solved (in principle) to get $x$ and $y$.
But, in this particular case, I think you have too many conditions, so, unless some of them are redundant, your set of equations won't have a solution.
Looking at things geometrically, each equation defines a curve in the plane, and we're looking for a point (or points) that lie on every one these curves. If you have two curves, it's intutively clear that these will probably intersect in some small finite number of points. But if there are three or more curves, it's not likely that any point will lie on all of them.
