4D Projection Playground
This is an orthographic projection of a 4-dimensional hypercube (also called a tesseract, which is basically a cube but in four instead of three dimensions) in 2D.
By introducing another spatial dimension, we are adding a new coordinate to the system, the w axis - instead of just having x, y, z we now have x, y, z, w. However, since our brains are designed to understand 3D and not 4D, it might be really difficult or even impossible for one to truly wrap their mind around this new dimension.
What you see is a wireframe model of the tesseract. The darker the lines, the "farther away" that line is from the viewport - since to render the cube we have to hide two out of the four dimensions (z and w). In the center you can see the coordinates: x is red, y is green, z is blue, w is yellow. There is also a magenta point, which is at the position (0.5, 0.5, 0.5, 0.5) at the start.
It's possible to rotate the tesseract using the interface at the bottom of the screen. You can click on the "Randomize Rotation" button to get a random rotation, or you can manually play around with the six planes of rotation (in 4D it's not possible to rotate solely on axes - rotations are fundamentally two-dimensional, which isn't the case in 3D). It is also important to note that the shown axes rotate with the tesseract, and are only aligned with the true axes of the simulation at the start, when no rotation is applied.
It might be difficult to wrap your head around what is happening here - that is understandable. I honestly couldn't either. However, I am fascinated by the fact that the cube actually looks like it's spinning (in a weird way that is), instead of it looking like random lines transforming in random ways, and I think that's pretty cool.
If you would like to learn more on how I made this, check out its GitHub repository:
Leave a comment
Log in with itch.io to leave a comment.