a = 0 (slider from 0 to 3, step 0.01)
g: (1 + sgn(2 - a + 0.001)) / 2
f: (1 + sgn(1 - a + 0.001)) / 2
d2: (1 - f) g
d1: f g
d3: (1 - f) (1 - g)
c: d2 (a - 1) + d3
b: d1 a + d2 + d3
d: d3 (a - 2)
A = (0, 0)
C = (10, 0)
e = Segment(A, C)
B = (0, 10)
h = Segment(A, B)
D = Point(h)
E = Point(e)
P, e_1, a_1, d_1 = Polygon(A, D, E)
F: E + (5, 0)
u = Vector(A, F)
A' = Translate(A, u)
D' = Translate(D, u)
E' = Translate(E, u)
P', e', a', d' = Polygon(A', D', E')
G: E' + (e_1, 0)
H: G + (0, d_1)
I: H + (0, e_1)
J: D' + (0, d_1)
K: J + (e_1, 0)
Q, d'_1, k, j = Polygon(K, J, D')
R, i, k_1, h_1 = Polygon(K, H, I)
S, e'_1, g_1, h_2 = Polygon(G, H, E')
v: b Vector[H, E']
K' = Translate(K, v)
H' = Translate(H, v)
I' = Translate(I, v)
R', i', k', h' = Polygon(K', H', I')
w: c Vector[H, I]
G' = Translate(G, w)
H'_1 = Translate(H, w)
E'' = Translate(E', w)
S', e'', g', h'_1 = Polygon(G', H'_1, E'')
z: d Vector[A, E]
K'_1 = Translate(K, z)
J' = Translate(J, z)
D'' = Translate(D', z)
Q', d'', k'_1, j' = Polygon(K'_1, J', D'')
T, j_1, i_1, g_2, a'_1 = Polygon(J, I, G, A')