Setup

Animate

n = 5 (slider from 1 to m + 1, step 1)
A1: (0, 0)
A2: (1, 1)
A3: (2, 0)
m: 12
b = true
step1 = PolyLine(A1, A2, A3)
step2 = PolyLine(Join[{Join[Sequence[{Vertex[step1, (2 * k) - 1], Dilate[Rotate[Vertex[step1, (2 * k)], 315°, Vertex[step1, (2 * k) - 1]], 1 / sqrt(2), Vertex[step1, (2 * k) - 1]], Vertex[step1, (2 * k)], Dilate[Rotate[Vertex[step1, (2 * k) + 1], 45°, Vertex[step1, (2 * k)]], 1 / sqrt(2), Vertex[step1, (2 * k)]]}, k, 1, (Length[{Vertex[step1]}] - 1) / 2]], {Vertex[step1, Length[{Vertex[step1]}]]}}])
step3 = PolyLine(Join[{Join[Sequence[{Vertex[step2, (2 * k) - 1], Dilate[Rotate[Vertex[step2, (2 * k)], 315°, Vertex[step2, (2 * k) - 1]], 1 / sqrt(2), Vertex[step2, (2 * k) - 1]], Vertex[step2, (2 * k)], Dilate[Rotate[Vertex[step2, (2 * k) + 1], 45°, Vertex[step2, (2 * k)]], 1 / sqrt(2), Vertex[step2, (2 * k)]]}, k, 1, (Length[{Vertex[step2]}] - 1) / 2]], {Vertex[step2, Length[{Vertex[step2]}]]}}])
step4 = PolyLine(Join[{Join[Sequence[{Vertex[step3, (2 * k) - 1], Dilate[Rotate[Vertex[step3, (2 * k)], 315°, Vertex[step3, (2 * k) - 1]], 1 / sqrt(2), Vertex[step3, (2 * k) - 1]], Vertex[step3, (2 * k)], Dilate[Rotate[Vertex[step3, (2 * k) + 1], 45°, Vertex[step3, (2 * k)]], 1 / sqrt(2), Vertex[step3, (2 * k)]]}, k, 1, (Length[{Vertex[step3]}] - 1) / 2]], {Vertex[step3, Length[{Vertex[step3]}]]}}])
step5 = PolyLine(Join[{Join[Sequence[{Vertex[step4, (2 * k) - 1], Dilate[Rotate[Vertex[step4, (2 * k)], 315°, Vertex[step4, (2 * k) - 1]], 1 / sqrt(2), Vertex[step4, (2 * k) - 1]], Vertex[step4, (2 * k)], Dilate[Rotate[Vertex[step4, (2 * k) + 1], 45°, Vertex[step4, (2 * k)]], 1 / sqrt(2), Vertex[step4, (2 * k)]]}, k, 1, (Length[{Vertex[step4]}] - 1) / 2]], {Vertex[step4, Length[{Vertex[step4]}]]}}])
step6 = PolyLine(Join[{Join[Sequence[{Vertex[step5, (2 * k) - 1], Dilate[Rotate[Vertex[step5, (2 * k)], 315°, Vertex[step5, (2 * k) - 1]], 1 / sqrt(2), Vertex[step5, (2 * k) - 1]], Vertex[step5, (2 * k)], Dilate[Rotate[Vertex[step5, (2 * k) + 1], 45°, Vertex[step5, (2 * k)]], 1 / sqrt(2), Vertex[step5, (2 * k)]]}, k, 1, (Length[{Vertex[step5]}] - 1) / 2]], {Vertex[step5, Length[{Vertex[step5]}]]}}])
step7 = PolyLine(Join[{Join[Sequence[{Vertex[step6, (2 * k) - 1], Dilate[Rotate[Vertex[step6, (2 * k)], 315°, Vertex[step6, (2 * k) - 1]], 1 / sqrt(2), Vertex[step6, (2 * k) - 1]], Vertex[step6, (2 * k)], Dilate[Rotate[Vertex[step6, (2 * k) + 1], 45°, Vertex[step6, (2 * k)]], 1 / sqrt(2), Vertex[step6, (2 * k)]]}, k, 1, (Length[{Vertex[step6]}] - 1) / 2]], {Vertex[step6, Length[{Vertex[step6]}]]}}])
step8 = PolyLine(Join[{Join[Sequence[{Vertex[step7, (2 * k) - 1], Dilate[Rotate[Vertex[step7, (2 * k)], 315°, Vertex[step7, (2 * k) - 1]], 1 / sqrt(2), Vertex[step7, (2 * k) - 1]], Vertex[step7, (2 * k)], Dilate[Rotate[Vertex[step7, (2 * k) + 1], 45°, Vertex[step7, (2 * k)]], 1 / sqrt(2), Vertex[step7, (2 * k)]]}, k, 1, (Length[{Vertex[step7]}] - 1) / 2]], {Vertex[step7, Length[{Vertex[step7]}]]}}])
step9 = PolyLine(Join[{Join[Sequence[{Vertex[step8, (2 * k) - 1], Dilate[Rotate[Vertex[step8, (2 * k)], 315°, Vertex[step8, (2 * k) - 1]], 1 / sqrt(2), Vertex[step8, (2 * k) - 1]], Vertex[step8, (2 * k)], Dilate[Rotate[Vertex[step8, (2 * k) + 1], 45°, Vertex[step8, (2 * k)]], 1 / sqrt(2), Vertex[step8, (2 * k)]]}, k, 1, (Length[{Vertex[step8]}] - 1) / 2]], {Vertex[step8, Length[{Vertex[step8]}]]}}])
step10 = PolyLine(Join[{Join[Sequence[{Vertex[step9, (2 * k) - 1], Dilate[Rotate[Vertex[step9, (2 * k)], 315°, Vertex[step9, (2 * k) - 1]], 1 / sqrt(2), Vertex[step9, (2 * k) - 1]], Vertex[step9, (2 * k)], Dilate[Rotate[Vertex[step9, (2 * k) + 1], 45°, Vertex[step9, (2 * k)]], 1 / sqrt(2), Vertex[step9, (2 * k)]]}, k, 1, (Length[{Vertex[step9]}] - 1) / 2]], {Vertex[step9, Length[{Vertex[step9]}]]}}])
step11 = PolyLine(Join[{Join[Sequence[{Vertex[step10, (2 * k) - 1], Dilate[Rotate[Vertex[step10, (2 * k)], 315°, Vertex[step10, (2 * k) - 1]], 1 / sqrt(2), Vertex[step10, (2 * k) - 1]], Vertex[step10, (2 * k)], Dilate[Rotate[Vertex[step10, (2 * k) + 1], 45°, Vertex[step10, (2 * k)]], 1 / sqrt(2), Vertex[step10, (2 * k)]]}, k, 1, (Length[{Vertex[step10]}] - 1) / 2]], {Vertex[step10, Length[{Vertex[step10]}]]}}])
step12 = PolyLine(Join[{Join[Sequence[{Vertex[step11, (2 * k) - 1], Dilate[Rotate[Vertex[step11, (2 * k)], 315°, Vertex[step11, (2 * k) - 1]], 1 / sqrt(2), Vertex[step11, (2 * k) - 1]], Vertex[step11, (2 * k)], Dilate[Rotate[Vertex[step11, (2 * k) + 1], 45°, Vertex[step11, (2 * k)]], 1 / sqrt(2), Vertex[step11, (2 * k)]]}, k, 1, (Length[{Vertex[step11]}] - 1) / 2]], {Vertex[step11, Length[{Vertex[step11]}]]}}])
step13 = PolyLine(Join[{Join[Sequence[{Vertex[step12, (2 * k) - 1], Dilate[Rotate[Vertex[step12, (2 * k)], 315°, Vertex[step12, (2 * k) - 1]], 1 / sqrt(2), Vertex[step12, (2 * k) - 1]], Vertex[step12, (2 * k)], Dilate[Rotate[Vertex[step12, (2 * k) + 1], 45°, Vertex[step12, (2 * k)]], 1 / sqrt(2), Vertex[step12, (2 * k)]]}, k, 1, (Length[{Vertex[step12]}] - 1) / 2]], {Vertex[step12, Length[{Vertex[step12]}]]}}])