If viewer doesn't appear, try here.
This viewer projects and lets you manipulate higher-dimensional polyhedra (polytopes) in order to attempt to visualize higher-dimensional space (or just enjoy the show). The default polytope is a four-dimensional cube (hypercube, tesseract) - for others press <configure>. There's lots of good material online about such figures (see links), so I won't go into much explanation here beyond what is particular to this viewer.
As usual the positive x direction is to the right on your screen, positive y is up. Positive z runs from you toward the screen, and just as all these dimensions are mutually perpendicular, the fourth dimension w runs perpendicular to them all. Where a three-dimensional cube might have corners (or vertices, singular vertex) at coordinates (x,y,z) = (±1, ±1, ±1), our hypercube starts out with vertices (x,y,z,w) = (±1, ±1, ±1, ±1) (actually we use coordinates ±.5, but why quibble). As in the three-dimensional case, vertices that differ in just one coordinate are connected by edges. Thus, with n coordinate dimensions, each edge runs in one of n perpendicular directions, n mutually perpendicular edges meeting at each vertex.
Your viewpoint is from the negative-z axis, looking toward the cube which is centered at the origin (0,0,0,0). You may consider that you are looking at a projection of the four-dimensional figure down into three-dimensional xyz-space. In particular, when an edge appears to cross in front of another of a different color, the first is closer to you in the z direction.
We view a so-called wire-frame figure, that is, just the edges with none of the faces filled in.
rotations
E.g. <xy> gives rotation in the xy plane: for each point (x,y,z,w) in our space, only the x and y coordinates are changed. (In three dimensions, this is just rotation about the z axis. The notion of rotation about an axis doesn't carry over smoothly to higher dimensions - the notion of rotation in a plane carries over exactly.) All rotations are about the origin.
- right-click or Ctrl-click for reverse rotation.
- keep the button pressed for continuous rotation, or
- double-click for continuous rotation, click any rotation button to stop.
- Shift-click for 45° rotation.
edge pointing and clicking
- placing the mouse pointer on an edge displays the coordinates of that point (to disable/enable this feature, go to
<options> | <show pointer coordinates>).- click on an edge to cycle it through the available colors (right- or Ctrl-click to reverse). This helps when you want to mark and follow particular groups of edges as you rotate the polytope. Do <options> | <reset color> to reset. (See also <options> | <label vertices>).
perspective
Again, consider that each point in four-dimensional xyzw space is projected onto a point in xyz space, and then projected onto a point in the xy space of the viewscreen. With perspective turned off, each point is projected perpendicularly, so-called orthographic projection. Mathematically, we just strip off the higher-dimension coordinates: the point (x,y,z,w) is projected to (x,y,z), which is projected to (x,y) on the viewscreen, where (0,0) is at the center.
<z-perspective> projection is standard: to get an xy point from an xyz point p, we imagine a projection screen, a plane parallel to the xy plane at distance 1 in front of our viewpoint v (which is always on the negative-z axis - it starts at z = -1.5). We draw a line from p to v, and where that line crosses the projection screen is our projected point: we just use those (x,y) coordinates. Points farther from the viewpoint in the z direction project closer to the center of the screen, so far objects project smaller.
<w-perspective> is a similar method for getting the xyz projection p of the original xyzw point q: we imagine a viewpoint u on the negative-w axis and as a screen a three-dimensional xyz hyperplane perpendicular to the w axis at distance 1 in front of the viewpoint. Where the line from q to u crosses the hyperplane gives the xyz-projected point. Applied to a 4-cube, this method can yield the often-seen "cube within a cube" representation of such.
distance
E.g., z-perspective is affected by the distance of the z-viewpoint from the object in view: closer gives a more pronounced effect (as when using a wide-angle lens). (See perspective.)
- click <z-distance> to move the z-viewpoint farther away,
- right- or Ctrl-click to move closer.
- hold button down for continuous motion.
- similarly for <w-distance>.
zoom
As with a lens, simply magnifies or de-magnifies the image.
- click to magnify.
- right- or Ctrl-click to reverse.
- hold button down to zoom continuously.
reset polytope
returns polytope to its original position and orientation.
reset all
- resets polytope.
- resets slice (even if not showing).
- returns z-distance, w-distance, and zoom to their original settings.
- if spaceship mode is on, returns it to its initial configuration.
movie
Enjoy! Note:
- clicking, e.g., <xy> while movie is running will set it going in that direction.
- all controls will work while the movie is running, but to avoid screen-redraw problems I recommend you stop the movie before accessing <options> or <configure>
speed
While movie is running or while polytope is continuously rotating,
Note: To get faster top speed:
- click to increase speed.
- right or Ctrl-click to decrease speed.
- close other applications, especially Java-based ones.
- make your figure smaller and/or less busy - the graphics-drawing operations are the speed bottleneck.
Slice Controls
Just as the intersection of a polyhedron with a plane is a polygon, the intersection a four-dimensional polytope with a three-dimensional hyperplane (by definition, a hyperplane has dimension one less than the ambient space), is a three-dimensional polyhedron, often called a slice. Select <show slice> or <show both> to display such a slice. The slicing hyperplane, or "plane" for short, is determined by a (linear) equation in x, y, z, and w. The default is w = 0, which just gives the intersection of the polytope with good old xyz space. Slightly more generally, w = e represents a parallel slicing plane, displaced by e. Finally
ax + by + cz + dw = erepresents a plane perpendicular to the line through the origin and the point (a,b,c,d). The plane is displaced from the origin by a distance proportional to the offset, e, by a factor that depends on a through d. For us, since the length of (a,b,c,d) is always 1, the distance in fact equals e.
- when <rotate polytope> is selected, all manual and movie rotations rotate the polytope only, leaving the slice plane fixed. Naturally as the polytope rotates, the slice itself, which is the intersection of the polytope with that plane, will change.
- when <rotate slice plane> is selected, all manual and movie rotations rotate (a,b,c,d), and thus the slice plane, about the origin, leaving the polytope fixed.
- when <rotate both> is selected, all manual and movie rotations rotate polytope and slice plane simultaneously. Thus the slice itself doesn't change, it's just carried along by the rotation. Use this mode when you want to look at different orientations of a particular slice.
- click <push slice> to increase the offset e, right- or Ctrl-click to decrease it.
- <reset slice> reverts to the default slice plane (w = 0 in dimension 4).
Example: to slice with z = 0, click <reset slice>, select <rotate slice plane> and Shift-click (or Shift-right-click or Shift-Ctrl-click) twice on <zw>.
Example: use 45° rotations to slice the 4-cube perpendicular to one of its long diagonals (e.g., one running from (-.5,-.5,-.5,-.5) to (.5,.5,.5,.5)), so-called vertex-first slicing. (Hint: one way is to rotate the slice plane from w = 0 to .5x + .5y + .5z + .5w = 0 (i.e., rotate the slice normal (a,b,c,d) from (0,0,0,1) to (.5,.5,.5,.5)). Having the plane oriented correctly with respect to the cube, for a better view you can rotate both. And of course <push slice> to move the slice along the diagonal.
options
color
- click on <color: polytope> or <color: slice> to cycle the respective figure through the available colors. Similarly for <color: background>.
- right- or Ctrl-click to cycle in reverse.
- <color: reset> reverts all specially colored edges to the colors chosen with <color: polytope> and <color: slice>.
brighten
- click on <brighten: polytope> or <brighten: slice> to brighten the respective figure (useful when using z-dimming).
- right- or Ctrl-click to dim.
thickness
- <polytope thickness> and <slice thickness> cycle through increasing line thickness for drawing the respective figures.
- right- or Ctrl-click to cycle in reverse.
z-dimming
When selected, the edges of the respective figure are drawn more dimly the farther away they (or, more precisely, their midpoints) are from the z-viewpoint in the z direction.
interior dimming
This presents options for rendering edges that lie in the interior of the xyz projection of the polytope (a four-dimensional polytope in its own four-dimensional space has no interior edges , any more than a polyhedron has). The options are
Click on <interior dimming> to cycle through the options, right- or Ctrl-click to cycle in reverse.
- no effect
- dim
- render with a dashed stroke
- don't draw
When using the last option, you are looking at the so-called envelope of the polytope. If the full xyz figure is the shadow of a wire-frame polytope cast on three-dimensional space, the envelope is the shadow of the corresponding solid polytope. To be exact, we view the wire-frame representation of the envelope.
label vertices
Useful when you want to keep track of particular vertices as the figure rotates.
Note: The vertices of a cube are numbered in a natural way using binary notation. A coordinate of -1 is represented by a binary digit 0, a coordinate of 1 is represented by a binary digit 1. The (x,y,z,w) coordinates of the vertex in its initial position give the binary digits (in reverse, sorry) of its number label, thus the vertex at (1,-1,1,1) is represented by 1101 binary, or 13 decimal. In dimension four the numbers run from 0 to 15. Vertices joined by edges differ by a power of 2, the power depending on the direction of the edge.
pointer coordinates
When enabled, positioning the mouse pointer on an edge displays the (approximate) coordinates of that point in four-space (or whatever dimension you've chosen). (If you're not pointing to an edge, there's of course no way to tell what point you're indicating in higher dimensional space.)
spaceship mode
Rotation is always about the origin (0,0,0,0). In normal mode, the polytope is centered on the origin, it sits there and rotates while you sit on the negative z axis and watch it, possible inching closer or backing away. In spaceship mode things are much more exciting. You are at the origin and the whole mad four-dimensional world rotates about you.
Positive x is still always to your right, positive y up, and positve z forward. As for the motion controls,
- the <z-distance> button becomes the <forward (z)> button. Click it to "move forward" i.e., pull everything back toward you, right- or Ctrl-click it for reverse.
- rotations involving z are "pitches and yaws": they change the direction your spaceship is facing.
- rotations not involving z are "rolls": they leave you facing in the same direction but with a different orientation.
The coordinates of the polytope's center are displayed to help keep you from getting lost - if z is negative, the polytope is behind you. As a last resort <reset all> will return everything to its intial position, still in spaceship mode. Not every spaceship comes with a reset button...
restore defaults
returns all settings in options dialog to their initial values.
configure
Select the dimension and polytope you prefer!polytopes
The above polytopes exist in any dimension. In dimension five and above, they are the only regular polytopes. In dimension three there are the Platonic solids - we don't bother with such pedestrian matters here. In dimension four however there are some interesting monsters. We offer only one:
- cube: we know what these are by now.
- cross polytope: in three dimensions this is an octahedron. In n dimensions, to construct it in its initial position, place vertices at ±1 on each coordinate axis (2n vertices in all) and draw edges from each vertex to every other one except its opposite. It is the so-called dual of the cube: you can obtain it by placing a point in the center of each of an n-cube's (n-1)-cube faces (there are 2n of them) and joining the points that lie in neighboring faces.
- simplex: in three dimensions this is a regular tetrahedron, in two dimensions an equilateral triangle. In n dimensions it has n+1 vertices, all equidistant, with edges joining every pair. It is its own dual.
...and for further information on polytopes and much more we refer you there. I find the cube by far the most helpful for getting a sense of four-dimensional space, since everything is perpendicular and one has such a strong visceral sense of what perpendicularity means, but YMMV.
- 24-cell: we construct this simply by constructing an octahedron as the dual to each of a four-cube's eight three-cube faces (see under cross polytope above). We do this because Eric Swab's site told us to...
detach
Opens the viewer in its own movable, resizable window. Just close the window to return the viewer to the page.