I followed https://en.wikipedia.org/wiki/Problem_of_Apollonius#Algebraic_solutions.
I tried to solve it using https://mathworld.wolfram.com/ApolloniusProblem.html.
I got to the point, where a, b, c, d, a', b', c' and d' were used for substitution and I computed x and y correctly.
Those x and y can then be plugged back into the quadratic equation (x-x1)^2 + (y-y1)^2 = (r(+or-)r1)^2 and solved using the quadratic formula.
I think I get the point that it should give me a formula to r, but when solving the quadratic equation, I tried more approaches and ended up with 2 full lists of paper and nowhere near to the end.
On wikipedia, there is a hint:
x = M + N*r
y = P + Q*r
where M, N, P and Q are known functions of the given circles and the choice of signs. Substitution of these formulae into one of the initial three equations gives a quadratic equation for rs, which can be solved by the quadratic formula.
But I totally don't get, what is the M, N, P and Q aka "known functions of the given circles".
I want to use it in an C++ algorithm and there is a Java solution: https://rasmusfonseca.github.io/implementations/apollonius.html, where you can see the individual computation steps and I can just use it as it is, but I want to get an understanding of the solution.
So
1) How to get those M, N, P and Q?
2) Knowing the a, b, c, d, a', b', c', d', x and y, how I get the r from quadratic formula (x-x1)^2 + (y-y1)^2 = (r(+or-)r1)^2, step by step?
I tried wolphramalpha (because I remember it giving steps of computation in its solution) with no success, but I don't use it very often, so maybe my input has not been suitable.
@Jean Marie
Let's say I have those 3 circles with radii 1, 2 and 3.
What are those zk (z1..z4) centers in your question? Can you give me an example? Or what would be their value in my example?
How in this scenario can I use that (2) formula from your question to help me?