Setup

Drag!

A: (0, 0)
B: (4, 0)
N: 7
M = 7 (slider from 1 to N, step 1)
Lm = Sequence(1, M)
LN = Sequence(1, N)
Sname = Zip("S" + (Text[n]), n, LN)
S1 = Sequence(k, k, 1, 2^(2), 2)
S2 = Sequence(k, k, 1, 2^(3), 2)
S3 = Sequence(k, k, 1, 2^(4), 2)
S4 = Sequence(k, k, 1, 2^(5), 2)
S5 = Sequence(k, k, 1, 2^(6), 2)
S6 = Sequence(k, k, 1, 2^(7), 2)
S7 = Sequence(k, k, 1, 2^(8), 2)
LK = Remove(LN, {1})
Tname = Zip("T" + (Text[n]), n, LK)
T2 = Sequence(k, k, 1, 2^(3), 4)
T3 = Sequence(k, k, 1, 2^(4), 4)
T4 = Sequence(k, k, 1, 2^(5), 4)
T5 = Sequence(k, k, 1, 2^(6), 4)
T6 = Sequence(k, k, 1, 2^(7), 4)
T7 = Sequence(k, k, 1, 2^(8), 4)
ShowExtra: false
base, f, g, h, i, C, D = Polygon(A, B, 4)
E = Midpoint(C, D)
arc = Semicircle(D, C)
F = Point(arc)
α = Angle(C, E, F)
C' = Rotate(C, α, E)
C'_1 = Rotate(C, α, E)
pointsBase: {D, C', C'_1, C}
points1 = BasePoints(A, B, α)
points2 = Join(Zip[BasePoints[Element[points1, k], Element[points1, k + 1], α], k, S1])
points3 = Join(Zip[BasePoints[Element[points2, k], Element[points2, k + 1], α], k, S2])
points4 = Join(Zip[BasePoints[Element[points3, k], Element[points3, k + 1], α], k, S3])
points5 = Join(Zip[BasePoints[Element[points4, k], Element[points4, k + 1], α], k, S4])
points6 = Join(Zip[BasePoints[Element[points5, k], Element[points5, k + 1], α], k, S5])
points7 = Join(Zip[BasePoints[Element[points6, k], Element[points6, k + 1], α], k, S6])
points8 = Join(Zip[BasePoints[Element[points7, k], Element[points7, k + 1], α], k, S7])
squares1 = Zip(Polygon[Element[points1, k], Element[points1, k + 1], 4], k, S1)
squares2 = Zip(Polygon[Element[points2, k], Element[points2, k + 1], 4], k, S2)
squares3 = Zip(Polygon[Element[points3, k], Element[points3, k + 1], 4], k, S3)
squares4 = Zip(Polygon[Element[points4, k], Element[points4, k + 1], 4], k, S4)
squares5 = Zip(Polygon[Element[points5, k], Element[points5, k + 1], 4], k, S5)
squares6 = Zip(Polygon[Element[points6, k], Element[points6, k + 1], 4], k, S6)
squares7 = Zip(Polygon[Element[points7, k], Element[points7, k + 1], 4], k, S7)
triangles1 = Polygon(points1)
triangles2 = Zip(Polygon[Element[points2, k], Element[points2, k + 1], Element[points2, k + 3]], k, T2)
triangles3 = Zip(Polygon[Element[points3, k], Element[points3, k + 1], Element[points3, k + 3]], k, T3)
triangles4 = Zip(Polygon[Element[points4, k], Element[points4, k + 1], Element[points4, k + 3]], k, T4)
triangles5 = Zip(Polygon[Element[points5, k], Element[points5, k + 1], Element[points5, k + 3]], k, T5)
triangles6 = Zip(Polygon[Element[points6, k], Element[points6, k + 1], Element[points6, k + 3]], k, T6)
triangles7 = Zip(Polygon[Element[points7, k], Element[points7, k + 1], Element[points7, k + 3]], k, T7)

Tool: BasePoints
Input: A, B, α
Output: pointsBase

A: (0, 0)
B: (4, 0)
base, f, g, h, i, C, D = Polygon(A, B, 4)
E = Midpoint(C, D)
arc = Semicircle(D, C)
F = Point(arc)
C' = Rotate(C, α, E)
C'_1 = Rotate(C, α, E)
pointsBase: {D, C', C'_1, C}