r

r'

|r-r'|

d

r+r'

d=r+r': 外接する

d>r+r': 一方が他方の外部にある

|r-r'|<d<r+r': 2点で交わる

d=|r-r'|: 内接する

d<|r-r'|: 一方が他方の内部にある

r

r'

r = 5 (slider from 1 to 10, step 1)
r' = 2 (slider from 1 to 10, step 1)
A = (-2.268432992463474, 3.84453035399407)
c = Circle(A, r)
B = (2.992336009808356, 6.041675054942904)
d = Circle(B, r')
C = Intersect(c, d, 1)
D = Intersect(c, d, 2)
f = Segment(A, B)
E = Intersect(c, f, 1)
G = (2, 0)
F = Intersect(d, f, 1)
H = Point(xAxis)
I: H + (0, r)
J: G + (0, r)
poly1, g, h, i, j = Polygon(G, H, I, J)
K = Point(xAxis)
L = Point(xAxis)
M: L + (0, r')
N: K + (0, r')
poly2, k, l, m, n = Polygon(K, L, M, N)
O = Point(xAxis)
P = Point(xAxis)
Q: P + (0, abs(r - r'))
R: O + (0, abs(r - r'))
poly3, o, p, q, r_1 = Polygon(O, P, Q, R)
S = Point(xAxis)
T = Point(xAxis)
U: T + (0, Length[f])
V: S + (0, Length[f])
poly4, s, t, u, v = Polygon(S, T, U, V)
W = Point(xAxis)
Z = Point(xAxis)
A_1: Z + (0, r)
B_1: W + (0, r)
poly5, w, z_1, a_1, b_1 = Polygon(W, Z, A_1, B_1)
C_1: A_1 + (0, r')
D_1: B_1 + (0, r')
poly6, b_2, a_2, c_1, d_1 = Polygon(B_1, A_1, C_1, D_1)
a: y = abs(r - r')
b: y = r + r'
dist = Length(f)