Animation

t = 1.78 (slider from 0 to 2, step 0.01)
A = (-1, -1, 0)
B = (1, -1, 0)
C = Point(Circle[B, Distance[A, B], Segment[A, B]])
a, D, E, F, G, H, faceABCD, faceADHE, faceABFE, faceBCGF, faceCDHG, faceEFGH, edgeAD, edgeAB, edgeBC, edgeCD, edgeAE, edgeDH, edgeEH, edgeEF, edgeBF, edgeFG, edgeCG, edgeGH = Cube(A, B, C)
r = 1 (slider from 0 to 2, step 0.1)
K = Centroid(faceABCD)
L = Centroid(faceABFE)
M = Centroid(faceADHE)
N = Centroid(faceBCGF)
O = Centroid(faceCDHG)
P = Centroid(faceEFGH)
u1: (r, 0, 0)
u2: (0, r, 0)
u3: ((-r), 0, 0)
u4: (0, (-r), 0)
u5: (0, 0, r)
u6: (0, 0, (-r))
list2: {faceABCD, faceABFE, faceADHE, faceBCGF, faceCDHG, faceEFGH}
list1: {u6, u4, u3, u1, u2, u5}
list3 = Sequence(Translate[Element[list2, i], Vector[(t * Element[list1, i])]], i, 1, 6, 1)
b, I, J, Q, faceKLM, faceKMQ, faceIMQ, faceILM, faceIJL, faceJKL, faceJKQ, faceIJQ, edgeKM, edgeLM, edgeKL, edgeMQ, edgeKQ, edgeIM, edgeIQ, edgeIL, edgeJL, edgeIJ, edgeJK, edgeJQ = Octahedron(M, L, K)
f = OrthogonalLine(L, faceIJL)
g = OrthogonalLine(J, faceIJL)
h = OrthogonalLine(I, faceIJL)
faceABFE' = Translate(faceABFE, u4)
R = Intersect(f, faceABFE')
distanceRL = Distance(R, L)
TextRL: Name[R] + (Name[L]) + " = " + distanceRL
c = Plane(R, faceIJL)
S = Intersect(h, c)
T = Intersect(g, c)
poly1, s, r_1, t_1 = Polygon(R, T, S)
u = Vector(R, L)
poly1' = Translate(poly1, Vector[((t - 1) * u)])
list4 = Sequence(Rotate[poly1, i], i, 0, (2 * π) - π / 2, π / 2)
list5 = Sequence(Rotate[poly1', i], i, 0, (2 * π) - π / 2, π / 2)
d = Plane(M, xOyPlane)
list4' = Mirror(list4, d)
list5' = Mirror(list5, d)
i = OrthogonalLine(I, faceIJQ)
j = OrthogonalLine(J, faceIJQ)
k = OrthogonalLine(Q, faceIJQ)
R' = Translate(R, Vector[((t - 1) * u)])
S' = Translate(S, Vector[((t - 1) * u)])
T' = Translate(T, Vector[((t - 1) * u)])
R'' = Rotate(R', π / 2)
S'' = Rotate(S', π / 2)
T'_1 = Rotate(T, π / 2)
poly2, t', r'', s'', s' = Polygon(T', R'', S'', S')
list6 = Sequence(Rotate[poly2, i], i, 0, (2 * π) - π / 2, π / 2)
list6' = Mirror(list6, d)
l = OrthogonalLine(I, faceIMQ)
m = OrthogonalLine(I, faceILM)
S''' = Rotate(S'', π / 2)
U = Rotate(S''', π / 2)
poly3, s''_1, s''', u_1, s'_1 = Polygon(S'', S''', U, S')
poly3' = Mirror(poly3, d)
T'' = Mirror(T', d)
R''_1 = Mirror(R', d)
R''' = Mirror(R'', d)
poly4, t'', r''', r''_1, t'_1 = Polygon(T'', R''', R'', T')
poly5, r''_2, t''_1, t'_2, r' = Polygon(R''_1, T'', T', R')
poly4' = Rotate(poly4, π / 2)
poly4'' = Rotate(poly4', π / 2)
poly4''' = Rotate(poly4'', π / 2)
poly5' = Rotate(poly5, π / 2)
poly5'' = Rotate(poly5', π / 2)
poly5''' = Rotate(poly5'', π / 2)
F' = Translate(F, Vector[(t * u4)])
F'_1 = Translate(F, Vector[(t * u1)])
F'_2 = Translate(F, Vector[(t * u5)])
F'' = Rotate(F', π / 2)
V = Rotate(F'_2, π / 2)
poly6, f_1, g_1, h_1 = Polygon(F', F'_1, F'_2)
poly7, n, p, q, e = Polygon(F'_1, F'', V, F'_2)
poly6' = Rotate(poly6, π / 2)
poly6'' = Rotate(poly6', π / 2)
poly6''' = Rotate(poly6'', π / 2)
poly7' = Rotate(poly7, π / 2)
poly7'' = Rotate(poly7', π / 2)
poly7''' = Rotate(poly7'', π / 2)
poly7'_1 = Mirror(poly7, d)
poly7''_1 = Mirror(poly7', d)
poly6''_1 = Mirror(poly6', d)
poly6'_1 = Mirror(poly6, d)
poly8 = Mirror(poly7''', d)
poly9 = Mirror(poly6''', d)
poly7'''_1 = Mirror(poly7'', d)
poly6'''_1 = Mirror(poly6'', d)
F''_1 = Mirror(F', d)
W = Mirror(F'_1, d)
poly10, f''_1, w, f'_1, f' = Polygon(F''_1, W, F'_1, F')
poly10' = Rotate(poly10, π / 2)
poly10'' = Rotate(poly10', π / 2)
poly10''' = Rotate(poly10'', π / 2)
Opacity = 1 (slider from 0 to 1, step 0.1)
o = true