CG

BC

Predná = 0 (slider from 0 to 1, step 0.1)
A = (-1, -1, 0)
B = (2, -1, 0)
C = Point(Circle[B, Distance[A, B], Segment[A, B]])
a, D, E, F, G, H, stenaABCD, stenaADHE, stenaABFE, stenaBCGF, stenaCDHG, stenaEFGH, hranaAD, hranaAB, hranaBC, hranaCD, hranaAE, hranaDH, hranaEH, hranaEF, hranaBF, hranaFG, hranaCG, hranaGH = Cube(A, B, C)
Bočná = 0 (slider from 0 to 1, step 0.01)
I = (2, -7)
J = (-1, -7)
K = Midpoint(G, I)
L = Midpoint(H, J)
stenaABFE'_{2} = Rotate(stenaABFE, (Bočná * 90°), hranaAB)
stenaEFGH' = Rotate(stenaEFGH, ((-Bočná) * 180°), Line[K, L])
c = true
q2 = Rotate(stenaABFE, (Predná * 90°), hranaAB)
d = false
q1 = If(c ≟ 1, Rotate[stenaBCGF, (Bočná * 90°), hranaBC])
q3 = Rotate(stenaEFGH, ((-Predná) * 180°), Line[K, L])
q4 = If(d ≟ 1, Rotate[stenaBCGF, ((-Bočná) * 90°), hranaCG])
stenaABFE' = Rotate(stenaABFE, (Bočná * 90°), hranaAB)