I'm trying to solve the problem mentioned in the title, and the answer detailed here provides exactly what I was looking for: https://stackoverflow.com/a/3349134/4777480...except for the fact that the author skips several steps, leaving me confused as to how he ended up with the results he obtained!
For starters, there's this line:
a = (r02 - r12 + d2 ) / (2 d)
Thankfully, a reply to the answer does clarify this one and I did verify it using the steps they detailed.
But leaves me with the last two steps...
How did we end up with this result?
P2 = P0 + a ( P1 - P0 ) / d
And how did that give us the intersection coordinates? (I think in the first line it should be 'a' instead of 'h' but I'm not sure, can someone clarify?)
x3 = x2 +- h ( y1 - y0 ) / d
y3 = y2 -+ h ( x1 - x0 ) / d
A step-by-step explanation would be greatly appreciated, I want to understand the full process so I can implement it correctly in my code.
So I tried verifying the formula Yves posted and I'm not sure if I made a mistake or if it's incorrect...
But, I managed to find a decent & simple answer from this page: https://planetcalc.com/8098/
Essentially, we have:
$$$$ $$ a=(r_1^2-r_2^2+d^2)/2d$$
and:
$$h=√(r_1^2-a^2)$$
Therefore:
$$x_4=a+x_1$$
$$y_4=h$$
The coordinates for the second intersection point would simply be:
$$(a+x_1,-h)$$