Seven Circle's Theorem
Author: Michael Borcherds

C_2 = (-246.76256458457345, -157.6972557415447)
C_1 = (-318.8545674439956, -155.45893430457954)
m_1 = Segment(C_2, C_1)
L_1 = (-333.4102266949287, -166.70254544164064)
c_1 = Circle(C_1, L_1)
N_1 = Intersect(c_1, m_1)
c_2 = Circle(C_2, N_1)
B = (-343.71495380198235, -19.759250250252254)
r_2 = Radius(c_2)
rx_3 = NaN (slider from 0 to 30, step 0.1)
A = (-384.93075611176204, -9.903297524000594)
r_1 = Radius(c_1)
d: y(C_2)
b: y(C_1)
c: x(C_2)
a: x(C_1)
l_1: (x - c)^(2) + (y - d)^(2) - (x - a)^(2) - (y - b)^(2) = ((r_2 - r_1) * (r_1 + r_2 + (2 * rx_3)))
G_1 = Point(l_1)
C_3 = (11.374388860413637, 18.43761556801493)
H_1 = Point(l_1)
f: y(H_1)
e: x(H_1)
r_8: (sqrt((a - e)^(2) + (b - f)^(2)) - sqrt((a - c)^(2) + (b - d)^(2)) + sqrt((c - e)^(2) + (d - f)^(2))) / 2
k = Circle(C_3, r_8)
C' = Center(k)
T = (1.7385758389999868, 46.27723590984792)
U = (-54.815282796274104, 20.06935020081846)
V = (-38.10967143788691, 25.893324802825006)
Z = (67.24840835929895, -63.36437443306262)
d_4 = Circle(G_1, rx_3)
r_9: ((((2 * e) - c - a) * (a - c)) + (((2 * f) - d - b) * (b - d))) / (r_2 - r_1) - r_1 - r_2
e_4 = Circle(H_1, r_9 / 2)
r_3 = 11.79 (slider from 0.3 to 30, step 1)
r_4 = 20.3 (slider from 0.3 to 30, step 1)
r_5 = 16.3 (slider from 0.3 to 30, step 1)
c_3 = CircleTangentTo2Circles(r_3, c_2, c_1)
c_4 = CircleTangentTo2Circles(r_4, c_3, c_1)
r_6 = 15.68 (slider from 0.3 to 30, step 1)
c_5 = CircleTangentTo2Circles(r_5, c_4, c_1)
c_6 = CircleTangentTo2Circles(r_6, c_5, c_1)
O_1, P_1 = Intersect(c_6, c_1)
Q_1, R_1 = Intersect(c_1, c_5)
S_1, E_2 = Intersect(c_1, c_4)
T_1, U_1 = Intersect(c_1, c_3)
V_1, W_1 = Intersect(c_2, c_1)
n_1 = Segment(R_1, V_1)
a_2 = Segment(P_1, U_1)
Z_1 = Intersect(n_1, a_2)
b_2 = Ray(S_1, Z_1)
D_2 = Intersect(c_1, b_2, 2)
p: x(D_2)
q: y(D_2)
A1: (2 * (p - a))
B1: (2 * (q - b))
C1: (-2 * r_1)
D1: ((p - a) * (p + a)) + ((q + b) * (q - b)) + r_1^(2)
C_6 = Center(c_6)
g: x(C_6)
h: y(C_6)
A2: (2 * (g - c))
B2: (2 * (h - d))
C2: (2 * (r_6 - r_2))
D2: ((g - c) * (g + c)) + ((h + d) * (h - d)) + ((r_2 - r_6) * (r_2 + r_6))
A3: (2 * (a - c))
B3: (2 * (b - d))
C3: (2 * (r_1 - r_2))
D3: ((a - c) * (a + c)) + ((b + d) * (b - d)) + ((r_2 - r_1) * (r_2 + r_1))
matrix1: {{A1, B1, C1}, {A2, B2, C2}, {A3, B3, C3}}
mInverse = Invert(matrix1)
matrix2: {{D1}, {D2}, {D3}}
matrix3: (mInverse * matrix2)
C_4 = Center(c_1)
r_7: abs(Element[Element[matrix3, 3], 1])
F_2: C_4 + (UnitVector[Segment[C_4, D_2]] * (r_1 + r_7))
G_2: (Element[Element[matrix3, 1], 1], Element[Element[matrix3, 1], 2])
C_7: (Element[Element[matrix3, 1], 1], Element[Element[matrix3, 2], 1])
i_2 = Segment(E_2, D_2)
c_7 = Circle(C_7, D_2)

Tool: SoddyCircles
Input: h, k, g
Output: d_1, c_1

B' = Center(h)
C' = Center(k)
A' = Center(g)
i = Segment(A', B')
n = OrthogonalLine(C', i)
j = Segment(B', C')
m = OrthogonalLine(A', j)
l = Segment(C', A')
p = OrthogonalLine(B', l)
G = Intersect(k, n, 2)
H = Intersect(k, n, 1)
I = Intersect(g, m, 1)
J = Intersect(g, m, 2)
L = Intersect(g, l)
M = Intersect(k, j)
N, S = Intersect(h, i)
E = Intersect(h, p, 1)
O = Intersect(h, p, 2)
q = Line(E, L)
r = Line(O, L)
s = Line(I, M)
t = Line(J, M)
a_1 = Line(G, N)
b_1 = Line(H, N)
D = Intersect(g, t, 2)
F = Intersect(k, a_1, 2)
K = Intersect(h, r, 2)
c_1 = Circle(F, D, K)
P = Intersect(k, b_1, 2)
Q = Intersect(h, q, 2)
R = Intersect(g, s, 2)
d_1 = Circle(R, Q, P)

Tool: 3TangentialCircles (command Tool2)
Click on 3 points
Input: C, B, A
Output: k, h, g

f: y(C)
e: x(C)
d: y(B)
c: x(B)
b: y(A)
a: x(A)
r_2: (sqrt((c - e)^(2) + (d - f)^(2)) - sqrt((a - e)^(2) + (b - f)^(2)) + sqrt((a - c)^(2) + (b - d)^(2))) / 2
h = Circle(B, r_2)
r_3: (sqrt((a - e)^(2) + (b - f)^(2)) - sqrt((a - c)^(2) + (b - d)^(2)) + sqrt((c - e)^(2) + (d - f)^(2))) / 2
k = Circle(C, r_3)
r_1: (sqrt((a - c)^(2) + (b - d)^(2)) - sqrt((c - e)^(2) + (d - f)^(2)) + sqrt((a - e)^(2) + (b - f)^(2))) / 2
g = Circle(A, r_1)

Tool: CircleTangentTo2Circles
Input: rx_3, c_4, t_3
Output: h_4

E_1 = Center(c_4)
r_2 = Radius(c_4)
C = Center(t_3)
r_1 = Radius(t_3)
f_4 = Circle(C, r_1 + rx_3)
g_4 = Circle(E_1, r_2 + rx_3)
I_1, J_1 = Intersect(g_4, f_4)
h_4 = Circle(I_1, rx_3)