Polyhedra packing animation

h = Slider(-(1+sqrt(5))/2-0.0001, 1, 0.001, 1, 110, false, true, false, false) SetValue(h, 1) A1_1 = (0, (1 + h), (1 - h^2)) A1_2 = (0, -(1 + h), -(1 - h^2)) A1_3 = (0, (1 + h), -(1 - h^2)) A1_4 = (0, -(1 + h), (1 - h^2)) A2_1 = ((1 + h), (1 - h^2), 0) A2_2 = (-(1 + h), -(1 - h^2), 0) A2_3 = ((1 + h), -(1 - h^2), 0) A2_4 = (-(1 + h), (1 - h^2), 0) A3_1 = ((1 - h^2), 0, (1 + h)) A3_2 = (-(1 - h^2), 0, -(1 + h)) A3_3 = (-(1 - h^2), 0, (1 + h)) A3_4 = ((1 - h^2), 0, -(1 + h)) A4_1 = ( 1, 1, 1) A4_2 = ( -1, -1, -1) A4_3 = ( 1, -1, -1) A4_4 = ( -1, 1, 1) A4_5 = ( 1, -1, 1) A4_6 = ( -1, 1, -1) A4_7 = ( 1, 1, -1) A4_8 = ( -1, -1, 1) poly1 = Polygon(A2_4, A4_4, A3_3, A4_8, A2_2) poly2 = Polygon(A4_6, A2_4, A2_2, A4_2, A3_2) poly3 = Polygon(A1_1, A4_4, A2_4, A4_6, A1_3) poly4 = Polygon(A2_1, A4_7, A1_3, A1_1, A4_1) poly5 = Polygon(A4_1, A1_1, A4_4, A3_3, A3_1) poly6 = Polygon(A4_8, A1_4, A4_5, A3_1, A3_3) poly7 = Polygon(A4_2, A1_2, A1_4, A4_8, A2_2) poly8 = Polygon(A4_5, A2_3, A2_1, A4_1, A3_1) poly9 = Polygon(A1_2, A4_3, A2_3, A4_5, A1_4) poly10 = Polygon(A3_2, A4_2, A1_2, A4_3, A3_4) poly11 = Polygon(A3_4, A4_3, A2_3, A2_1, A4_7) poly12 = Polygon(A3_4, A4_7, A1_3, A4_6, A3_2) to = Slider(0, pi/3, 0.01, 1, 160, false, true, false, false) obj = {poly1, poly2, poly3, poly4, poly5, poly6, poly7, poly8, poly9, poly10, poly11, poly12} Q1 = Rotate(obj, to, Line(A4_1, A4_2)) C1 = Rotate(A4_5, to, Line(A4_1, A4_2)) C2 = Rotate(A1_2, to, Line(A4_1, A4_2)) P1 = Plane(C1, poly6) Q2 = Reflect(Q1, P1 ) P2 = Reflect(P1, (0,0,0)) Q3 = Reflect( Q1, P2 ) C3 = Rotate(A4_8, to, Line(A4_1, A4_2)) P3 = Plane(C3, poly1) Q4 = Reflect(Q1, P3 ) P4 = Reflect(P3, (0,0,0)) Q5 = Reflect(Q1, P4 ) C4 = Rotate(A2_3, to, Line(A4_1, A4_2)) P5 = Plane(C4, poly9) Q6 = Reflect(Q1, P5 ) P6 = Reflect(P5, (0,0,0)) Q7 = Reflect(Q1, P6 )