I was working on the same problem and got the solution:
we must obtain the system of equations of the 3 circles. The following is only for the first equation where x_1, y_1 and r_1 are the data of the known circle.
(x - x_1)^2 + (y - y_1)^2 = r_1^2
The squares in the equation are expanded to simplify it.
Simplify the similar terms in the equation and set it equal to zero
The system of quadratic equations is solved.
As I mentioned, I was solving this same problem and programmed the solution in python:
from sympy import symbols, Eq, simplify
def devolverEcuacion(x1, y1, r1):
Definir la ecuación original
ecuacion_original = (x - x1)2 + (y - y1)2 - (r + r1)**2
Expandir los cuadrados
ecuacion_expandida = expand(ecuacion_original)
Simplificar términos semejantes
ecuacion_simplificada = collect(ecuacion_expandida, [x, y, r])
eq = Eq(ecuacion_simplificada, 0)
print(eq)
return eq
Datos del primer círculo
x1, y1, r1 = -5.0, 5.0, 2.3255488872528076
eq1 = devolverEcuacion(x1, y1, r1)
Datos del segundo círculo
x2, y2, r2 = 5.0, -3.1395609378814697, 1.3953293561935425
eq2 = devolverEcuacion(x2, y2, r2)
Datos del tercer círculo
x3, y3, r3 = -1.7442314624786377, 5.0, 0.9302195310592651
eq3 = devolverEcuacion(x3, y3, r3)
Resolver el sistema de ecuaciones numéricamente
sol = solve((eq1, eq2, eq3), (r, x, y), dict=True)
Imprimir la solución
print("Solución:")
print(sol)
for this example:
Eq(-1.0*r**2 - 4.65109777450562*r + 1.0*x**2 + 10.0*x + 1.0*y**2 - 10.0*y + 44.5918223729972, 0)
Eq(-1.0*r**2 - 2.79065871238708*r + 1.0*x**2 - 10.0*x + 1.0*y**2 + 6.27912187576294*y + 32.9098988704157, 0)
Eq(-r**2 - 1.86043906211853*r + 1.0*x**2 + 3.48846292495727*x + 1.0*y**2 - 10.0*y + 27.1770350187362, 0)
Solución:
[{r: -18.5438116854768, x: -10.6217988468949, y: -10.2127389354221}, {r: 4.77849716604361, x: -0.626523746806375, y: -0.598229701442041}]
The solution has two options, the inner circle and the outer circle.
