Wednesday, February 25, 2009

Hypercube

Hypercube: "Return to Drew's Home Page Hypercube

A friend of mine was reading a book about the fourth dimension and was having a hard time visualizing hypercubes, so I wrote a program so he could play with a hypercube interactively.

The user can rotate around the hypercube, or perform direct-manipulation rotations in 4D.

For a 4D rotation, the 3D vector described by the dragging of the mouse in the plane of the screen combined with the 4D unit vector (0 0 0 1) specify two basis vectors of a four-dimensional plane of rotation.

This is a lot more intuitive than a set of sliders.

Before I show an example of the 4D rotation, wrap your head around this simple 3D rotation of a regular old cube.



In the above sequence, the red square is the back face of the cube. It's smaller than the other squares because it's farther away from the viewer. As it the cube rotates around 90 degrees, the red square becomes a trapezoid.

Here's the hypercube. Instead of a bunch of squares connected together, it's a bunch of cubes all fused into a big weird mess."

No comments:

Top Stories - Google News