Rotating hypercube

Screen Saver

Hyper Screen Saver: Freeware for Windows

The Hyper screen saver displays a rotating 4-dimensional object (hypercube or 4-simplex) projected onto 3-space using a 4-D perspective transformation.

Notes

The screen saver fundamentals were based on an example (minimal screen saver) published online by Lucian Wischik (www.wischik.com/scr/). The math of n-dimensional rotation, perspective transformation, and hidden facet removal is my own work.

In 2009, I converted the original Hyper screen saver from Borland C++ to Microsoft Visual C++ and cleaned up the code. In March 2010, I added the hyperbrick option.

File Description
Hyper-2010.zip Zipped file containing the Hyper screen saver (2010 MSC version)

Remarks

When a rotating cube in 3 is projected onto a 2-dimensional display surface using a 3-D perspective transformation, the facets that are farther away from the center of projection (CP) appear smaller than the facets that are closer. In a transparent wire-frame rendering, the back facets (squares) seem to shrink and pass through the front facets and then grow as they again become front facets. When shading and hidden-surface removal are done, a facet disappears from view whenever it faces away from the CP and reappears when it rotates so that it faces the CP again.

Something similar happens when a rotating hypercube in 4 is projected down to 3 using a 4-D perspective transformation. In a transparent rendering, the back facets (which are 3-dimensional cubes in this case) shrink and pass through the front facets before starting to grow again. With shading and hidden-facet removal, the facets appear and disappear (but the rendering is complicated by the need to perform another projection to map the 3-D image onto a 2-dimensional display surface).

The animated GIF at the upper right corner of this page shows the rotating hypercube. Clicking the image selects a different version with a different rotation plane (using Javascript).

Since I started experimenting with the hyperbrick shape (see below), I’ve decided I like it better than the simplex or the hypercube. I considered a monolith à la 2001: A Space Odyssey (1 × 4 × 9 × 16), but I think using the golden ratio makes a more æsthetically pleasing image.

Rotating hyper-brick

To-Do List

Note: If you click the animated GIF file in the upper right corner of this page, it should change to another version with a different rotation.