This is a tesseract, a four-dimensional cube, which contains two cubes. Here, each side length of the smaller one is 1, while the side length of the bigger one is 2. How do make I it?
I am still working on it, and I wish to see different approaches.

|
|
My approach. The main distinguishing feature being the ridiculously clumsy and inefficient way of calculating the faces...
|
|||||||||||||||||
|
|
Here is my (slightly less) modest attempt to depict the Clifford rotation (a.k.a. double rotation) of a hypercube, using perspective projection (i.e., a Schlegel diagram) to view the rotation (see this for a discussion on perspective projection):
Of note is that in assembling the transformation corresponding to a Clifford rotation, the order of application does not matter (i.e. the component rotations of a Clifford rotation are commutative); thus, both |
||||
|
|
|
This is my approach, has nothing to do with projection, and it is a little complicated. I get all coordinates and faces first to determine both start and end state. Then, change the start state smoothly to the end.
Here is the result:
|
|||||
|
|
I tried something similar last week but with the 24-cell. Perhaps it can be modified for the tesseract. Create a stereographic projection function from the 3-sphere (in $\mathbb{R}^4$) to $\mathbb{R}^3$.
Create a list of the 24 vertices. I got the coordinates from the wikipedia page for the 24-cell.
We pick random axes for two rotations in $\mathbb{R}^4$. Each rotation is determined by 2 axes.
Rotate the vertices in $\mathbb{R}^4$ with respect to an angle parameter. We perform two rotations, an initial rotation, then a rotation which depends on a parameter. The reason we do this is to avoid having a vertex at "infinity", which doesn't look so nice. Then take pairs of vertices at a distance of 1 from each other (in $\mathbb{R}^4$) to get the edges of the 24-cell.
Stereographic project the vertices to $\mathbb{R}^3$, then plot the edges.
Here's a gif of a slight modification of the above code.
|
|||||||
|