Message Boards Message Boards

[GIF] Self-Dual (Rotating 24-cell)

GROUPS:

Rotating 24-cell

Self-Dual

More or less, this animation shows a rotating 24-cell. Of course, the title is a reference to the fact that the 24-cell is self-dual.

Since the 24-cell is a 4-dimensional regular polytope, what I'm really showing is a projection of a rotating 24-cell to 3-space (and then of course that gets projected to your 2-dimensional screen). In fact, I'm not even quite doing that. What I'm actually doing is stereographically projecting the vertices of the 24-cell as they rotate, then connecting the projected vertices by straight line segments. In other words, I am not projecting the edges of the 24-cell: I'm just projecting the vertices and then connecting appropriate ones by segments in 3-d.

Of course, to do this I need the vertices of the 24-cell:

twenty4cellvertices = Normalize /@ DeleteDuplicates[
    Flatten[Permutations /@ ({-1, -1, 0, 0}^Join[#, {1, 1}] & /@ Tuples[{0, 1}, 2]), 1]];

And I need to know which vertices are connected by edges:

twenty4celledges = Select[Subsets[
    twenty4cellvertices, {2}], #[[1]] != -#[[2]] && HammingDistance[#[[1]], #[[2]]] == 2 &];

(In fact, I'm just storing the edges as pairs of vertices, which I will then apply the rotation and projection maps to and then connect the resulting pairs of points in $\mathbb{R}^3$ by tubes.)

Also, I need a stereographic projection function:

Stereo3D[{x1_, y1_, x2_, y2_}] := {x1/(1 - y2), y1/(1 - y2), x2/(1 - y2)};

And now I'm ready to make the animation, with the help of my trusty smootheststep function:

smootheststep[t_] := -20 t^7 + 70 t^6 - 84 t^5 + 35 t^4;

With[{viewpoint = 100 Normalize[{1, 1 - Sqrt[2], 0}],
  cols = RGBColor /@ {"#0CCA98", "#5E366A", "#201940"}},
 Manipulate[
  Graphics3D[
   {Thickness[.004],
    Tube[#, .05] & /@ (Stereo3D[
           RotationTransform[π/2 smootheststep[t], {{1, 1, 0, 0}, {0, 0, 1, 1}}][Normalize[#]]] & /@ # & /@ twenty4celledges)},
   PlotRange -> 3.1, ImageSize -> 540, ViewPoint -> viewpoint, 
   ViewVertical -> {0, 0, 1}, Boxed -> False, ViewAngle -> π/300, Background -> cols[[-1]],
   Lighting -> {{"Point", cols[[1]], {0, -3, 0}}, {"Point", cols[[2]], {3, 0, 0}}, {"Ambient", cols[[-1]], viewpoint}}],
  {t, 0, 1}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
6 months ago

enter image description here - Congratulations! This post is now a Staff Pick as distinguished on your profile! Thank you, keep it coming!

POSTED BY: Moderation Team
Answer
3 months ago

Group Abstract Group Abstract