Animation

Choisis la longuer et la largeur puis déplace le curseur.

AB = 2.5 (slider from 0 to 10, step 0.1)
BC = 5 (slider from 0 to 10, step 0.1)
A = (-0.3633578515094408, 5.758021369440265)
c = Circle(A, AB)
B = Point(c)
a = Segment(A, B)
d = Circle(B, BC)
b = OrthogonalLine(B, a)
C_1, C = Intersect(d, b)
e = Segment(A, C)
O = Midpoint(e)
D = Mirror(B, O)
f = Segment(C, D)
g = Segment(D, A)
F = Intersect(xAxis, yAxis)
u = Vector(B, F)
t = -50 (slider from -50 to 150, step 0.1)
poly1, a_1, b_1, c_1, d_1 = Polygon(A, B, C, D)
A'_1 = Rotate(A, 270*°, C)
B'_1 = Rotate(B, 270*°, C)
C'_1 = Rotate(C, 270*°, C)
D'_1 = Rotate(D, 270*°, C)
poly1'_1, a', b', c', d' = Polygon(A'_1, B'_1, C'_1, D'_1)
A'' = Rotate(A'_1, 270*°, D'_1)
B''_1 = Rotate(B'_1, 270*°, D'_1)
C''_1 = Rotate(C'_1, 270*°, D'_1)
D'' = Rotate(D'_1, 270*°, D'_1)
poly1'', a'', b'', c''_1, d'' = Polygon(A'', B''_1, C''_1, D'')
A'''_1 = Rotate(A'', 270*°, A'')
B'''_1 = Rotate(B''_1, 270*°, A'')
C'''_1 = Rotate(C''_1, 270*°, A'')
D'''_1 = Rotate(D'', 270*°, A'')
poly1'''_1, a''', b''', c'''_2, d'''_2 = Polygon(A'''_1, B'''_1, C'''_1, D'''_1)
A' = Rotate(A, -t * 90 * ° / 20, C)
B'_2 = Rotate(B, -t * 90 * ° / 20, C)
C'_2 = Rotate(C, -t * 90 * ° / 20, C)
D' = Rotate(D, -t * 90 * ° / 20, C)
poly1', a'_1, b'_1, c'_1, d'_1 = Polygon(A', B'_2, C'_2, D')
E = Rotate(A'_1, -(t - 20) * 90 * ° / 20, D'_1)
G = Rotate(B'_1, -(t - 20) * 90 * ° / 20, D'_1)
H = Rotate(C'_1, -(t - 20) * 90 * ° / 20, D'_1)
I = Rotate(D'_1, -(t - 20) * 90 * ° / 20, D'_1)
poly2, e_1, g_1, h, i = Polygon(E, G, H, I)
A'''_2 = Rotate(A'', -(t - 40) * 90 * ° / 20, A'')
B''' = Rotate(B''_1, -(t - 40) * 90 * ° / 20, A'')
C''' = Rotate(C''_1, -(t - 40) * 90 * ° / 20, A'')
D'''_2 = Rotate(D'', -(t - 40) * 90 * ° / 20, A'')
poly1''', a'''_1, b'''_1, c'''_1, d'''_1 = Polygon(A'''_2, B''', C''', D'''_2)
B'_3 = Translate(B, u)
C'_3 = Translate(C, u)
j = Segment(B'_3, C'_3)
J = Translate(C'_1, u)
K = Translate(D'_1, u)
c''_2 = Segment(J, K)
D'''_3 = Translate(D'', u)
A'''_3 = Translate(A'', u)
d'''_3 = Segment(D'''_3, A'''_3)
L = Translate(A'''_1, u)
M = Translate(B'''_1, u)
k = Segment(L, M)
p = Circle(F, 2 * (AB + BC))
N, P = Intersect(p, xAxis)
α = Angle(P, B'_3, C'_3)
B'' = Rotate(B'_3, -α, F)
C'' = Rotate(C'_3, -α, F)
j'_1 = Segment(B'', C'')
J'_1 = Rotate(J, -α, F)
K'_1 = Rotate(K, -α, F)
c''' = Segment(J'_1, K'_1)
Q = Rotate(D'''_3, -α, F)
R = Rotate(A'''_3, -α, F)
l = Segment(Q, R)
L'_1 = Rotate(L, -α, F)
M'_1 = Rotate(M, -α, F)
k'_1 = Segment(L'_1, M'_1)
B' = Translate(B, Vector[(t - 60) * u / 20])
C' = Translate(C, Vector[(t - 60) * u / 20])
m = Segment(B', C')
S = Translate(C'_1, Vector[(t - 60) * u / 20])
T = Translate(D'_1, Vector[(t - 60) * u / 20])
c'' = Segment(S, T)
D''' = Translate(D'', Vector[(t - 60) * u / 20])
A''' = Translate(A'', Vector[(t - 60) * u / 20])
d''' = Segment(D''', A''')
U = Translate(A'''_1, Vector[(t - 60) * u / 20])
V = Translate(B'''_1, Vector[(t - 60) * u / 20])
n = Segment(U, V)
W = Rotate(B'_3, -α * (t - 80) / 20, F)
Z = Rotate(C'_3, -α * (t - 80) / 20, F)
j' = Segment(W, Z)
J' = Rotate(J, -α * (t - 80) / 20, F)
K' = Rotate(K, -α * (t - 80) / 20, F)
q = Segment(J', K')
A_1 = Rotate(D'''_3, -α * (t - 80) / 20, F)
B_1 = Rotate(A'''_3, -α * (t - 80) / 20, F)
r = Segment(A_1, B_1)
L' = Rotate(L, -α * (t - 80) / 20, F)
M' = Rotate(M, -α * (t - 80) / 20, F)
k' = Segment(L', M')
texte1 = Text("Périmètre d'un rectangle")
texte2: Text["Périmètre du rectangle = " + (2 * (AB + BC))] + " cm"