Polytope Viewer

You need <a href="http://java.com/en/download/index.jsp">Java</a> to use the viewer.

If viewer doesn't appear, try here.

Contents

Overview

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.

Controls

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.

edge pointing and clicking

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.)

zoom

As with a lens, simply magnifies or de-magnifies the image.

reset polytope

returns polytope to its original position and orientation.

reset all

movie

Enjoy! Note:

speed

While movie is running or while polytope is continuously rotating,

Note: To get faster top speed:

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 = e
represents 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.

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

brighten

thickness

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.

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 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: ...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.

detach

Opens the viewer in its own movable, resizable window. Just close the window to return the viewer to the page.

Links

Contact