Une solution du problème du pâtissier

Placez les morceaux de tartes en déplaçant les points A, B et C.
Changez l'allure du triangle en bougeant le sommet D (alias C).

A_1 = (-3.385520610409173, -2.774267519994307)
B_1 = (10.610811348587028, -2.7349742042538536)
C_1 = Midpoint(A_1, B_1)
a = Line(A_1, B_1)
b = OrthogonalLine(C_1, a)
D = (-0.3554644739192591, 3.6562725015254913)
D'_1 = Mirror(D, b)
E = Point(a)
E'_1 = Mirror(E, b)
poly1, e, d, a_1 = Polygon(D, A_1, E)
poly2, b_1, d', e' = Polygon(D'_1, E'_1, B_1)
c = AngularBisector(D, E, A_1)
f = AngularBisector(D, A_1, E)
M = Intersect(c, f)
N = Mirror(M, b)
g = Semicircle(A_1, B_1)
A = Point(g)
h = OrthogonalLine(M, e)
i = OrthogonalLine(M, a)
j = OrthogonalLine(M, a_1)
H = Intersect(h, e)
I = Intersect(j, a_1)
J = Intersect(a, i)
H'_1 = Mirror(H, b)
I'_1 = Mirror(I, b)
J'_1 = Mirror(J, b)
poly3, a_2, h_1, f_1, j_1 = Polygon(A_1, H, M, J)
α = Angle(A, C_1, A_1)
β = Angle(J, A_1, H)
γ: α * β / 3.141592653589793
A'_1 = Rotate(A_1, -(α), C_1)
F'_2 = Rotate(M, -(α), C_1)
J'_2 = Rotate(J, -(α), C_1)
A''_1 = Rotate(A'_1, γ, A)
K = Intersect(j, a_1)
A' = Rotate(A_1, -(α), C_1)
H'_2 = Rotate(H, -(α), C_1)
F'_3 = Rotate(M, -(α), C_1)
J'_3 = Rotate(J, -(α), C_1)
poly3', a', h', f', j' = Polygon(A', H'_2, F'_3, J'_3)
A'' = Rotate(A', -(γ), A)
H''_1 = Rotate(H'_2, -(γ), A)
M_1 = Rotate(F'_3, -(γ), A)
J''_1 = Rotate(J'_3, -(γ), A)
poly3'', a'', h'', f'', j'' = Polygon(A'', H''_1, M_1, J''_1)
k = Semicircle(E, E'_1)
poly4, e_1, j_2, f_2, k_1 = Polygon(E, J, M, K)
B = Point(k)
δ = Angle(B, C_1, E)
E' = Rotate(E, -(δ), C_1)
J' = Rotate(J, -(δ), C_1)
F'_4 = Rotate(M, -(δ), C_1)
K'_1 = Rotate(K, -(δ), C_1)
poly4', e'_1, j'_1, f'_1, k' = Polygon(E', J', F'_4, K'_1)
ε = Angle(K, E, J)
ζ: ε * δ / 3.141592653589793
E'' = Rotate(E', ζ, B)
J'' = Rotate(J', ζ, B)
F''_2 = Rotate(F'_4, ζ, B)
K''_1 = Rotate(K'_1, ζ, B)
poly4'', e'', j''_1, f''_1, k'' = Polygon(E'', J'', F''_2, K''_1)
θ = Angle(H, D, K)
poly5, d_1, h_2, f_3, k_2 = Polygon(D, H, M, K)
l = LineBisector(K, J''_1)
m = LineBisector(I, H'_1)
G = Intersect(b, m)
p = CircleArc(G, D, D'_1)
C = Point(p)
η = Angle(D, G, C)
poly6, d_2, h_3, f_4, i_1 = Polygon(D, H, M, I)
D' = Rotate(D, η, G)
H' = Rotate(H, η, G)
F' = Rotate(M, η, G)
I' = Rotate(I, η, G)
poly6', d'_1, h'_1, f'_2, i' = Polygon(D', H', F', I')