Given two points in 2D space, say $A=(x_1,y_1$), $B=(x_2,y_2)$, find a third point $C=(a,b)$ that it's distances to A and B will be d1 and d2. This problem seems quite easy to solve, since it can be described as 2 equations with 2 variables: $$(y_1-b)^2 + (x_1-a)^2 = d_1^2$$ $$(y_2-b)^2+(x_2-a)^2=d_2^2$$ but the solution for this two equations is quite cumbersome. I tried to go directly at it and the beginning is ok: by subtracting the equations we get: $$ b=\frac{(y_1^2-y_2^2)+(x_1^2-x_ 2^2)-2(x_1-x_2)a-(d_2^2-d_1^2)}{2(y_1-y_2)}$$ When I place the result in any of the original equations it gets pretty messy. I also tried to think of the dots as vectors, or with polar coordinates, but I didn't get any further.
Can anyone think of a little bit more elegant solution?
We can find the point using vectors.
If there is a solution to the problem (if and only if $d1+d2>= |AB|) then ABC is a triangle, which we know the size of all of its edges, and there for we can find its angles. Then we can find point C threw vector operations. for example:
let say we have : $A = (1,0)$, $B = (6,6), d_1=1$ $, d_2=7$ and we are looking for point C.
First let's think of AB as a vector: $\vec{AB}=(\sqrt{61},50.1944^\circ)$.
Then we can compute $\angle B=33.67^\circ =\theta $ (by cosine rule or any other way). Now we know point C is at the end of a vector $\vec{BC}$ that its length is $d_1=1$ and it's direction is $33.67^\circ$ relatively to the opposite direction of $\vec{AB}:$ $$50.194- 180 + \theta = -96.136$$ Then find point C using vector addition from point B: $$ C_x = 6+d_1*cos(-96.136) \approx5.89312$$ $$ C_y = 6+d_1*sin(-96.136) \approx 5.0057$$
For the second solution we can do the same computation for : $50.194- 180 - \theta$...