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

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 I 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 or part of a face appears to cross in front of another of a different color, the first is closer to you in the z direction.

Controls

rotations

buttons

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.

click-and-drag

You can also rotate the figure by clicking-and-dragging.
  • By default the rotation is in xyz-space: imagine that you're moving the mouse pointer on a plane z = -.1, w = 0 in front of the origin (0,0,0,0) - the rotation is in the plane through the two most recently sampled points your mouse passed through and the origin.
  • Press Shift while dragging to get rotation in xyw-space (same as above with z and w switched).
  • Should you choose to venture into even higher dimensions, Ctrl will give you xyt-space rotations, and Ctrl+Shift will give you xyu. (Note: The t does not stand for "time"!)

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: draw a line from the point perpendicular to the projection screen - where the line hits the screen is the point's projection. Mathematically, you just strip off the higher-dimension coordinates: with w-perspective turned off, the point (x,y,z,w) is projected to (x,y,z); with z-perspective turned off the point (x',y',z') is projected to (x',y').

z-perspective projection is standard: to get an xy point from an xyz point b, we imagine as a projection screen a plane parallel to the xy plane at distance 1 in front of our viewpoint p which is always on the negative-z axis - the default is z = -1.5. We draw a line from p to b, 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 an analogous method for getting the xyz projection b of the original xyzw point a: we imagine a viewpoint q 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 q. Where the line from q to a crosses the hyperplane gives the xyz-projected point b. 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 shrinks 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:

options...

rendering

Rendering option controls are placed on a grid. Regarding the column names, "polytope interior" refers to the interior of the xyz projection of the polytope - in its own higher-dimensional space the polytope has no interior edges or faces, any more than a polyhedron in 3-space has.

edges

Draw the line segments connecting neighboring vertices.

faces

Fill in the polytope's two-dimensional faces. Again we're actually looking at the xyz-projection of a face---the face is shaded according to the angle that projection makes with the z axis (in four-space itself, a two-dimensional face would reflect no more light than an infinitely thin wire would in three-space). In particular, when moving the viewpoint with z-distance when z-perspective is on, or forward (z) when in spaceship mode, be aware that when you appear to pass through a 2-d face of the figure you're really just passing through that face's projection or shadow. It's as hard to hit a 2-d face in 4-space with the viewpoint as it is to hit an infinitesmally-thin line in 3-space.
Note: You can display both edges and faces at once: when looking at the interior faces of a polytope this helps you to tell which seams where faces meet are actual polytope edges and which are formed by the faces inter-penetrating.

You can also choose to display neither faces nor edges of a category. E.g., when using this option on the polytope interior, you are left looking at the so-called envelope of the polytope. While the full xyz figure is the shadow on xyz-space of the skeleton formed by the polytope's edges (the so-called wire-frame) and/or two-dimensional faces, the envelope is the shadow of the solid polytope. (If you display only the exterior edges, you're looking at the envelope's wire-frame.)

color

  • Click to cycle the edges or faces of that category through the available colors.
  • Right- or Ctrl-click to cycle in reverse.
  • When displaying both edges and faces for that category, Shift-click (or Shift+right-click or Shift+Ctrl-click) to cycle just the edge colors.

thickness

  • Cycle through increasing line thickness for drawing the category's edges.
  • Right- or Ctrl-click to cycle in reverse.

transparency

  • Click to make faces more transparent.
  • Right- or Ctrl-click to reverse.

dash

Click to render edges dashed, click again to undo. Dashing can be helpful for distinguishing interior from exterior edges.

brightness

Click to brighten the category's edges or faces; right- or Ctrl-click to dim.

z-shading

Edges are rendered dimmer the farther they are from the viewpoint in the z direction.

defaults

Restore all default settings for the category.

other options

background color

Click to cycle background through available colors; right- or Ctrl-click to cycle in reverse.

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 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 or reset polytope 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, and uncolors specially colored edges.

slicing...

Click to access the slicing dialog. 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. 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. w = e represents a parallel slicing plane, displaced by e. Generally,
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. When the length of the segment from the origin to (a,b,c,d) is 1 , the distance in fact equals e. This is always the case with the slice equation displayed on the viewscreen.

main

equation

allows you to enter a slice plane equation with integer coefficients manually (if your coefficients are irrational, you're out of luck). Click the "zero" button next to any value to zero it.

point & click

You can also select the slicing axis by pointing and clicking on the polytope's vertices or edges.
  • Click begin.
  • one point: In this mode the slice axis runs through the center of the polytope and the point you click.
  • two points: In this mode click on two points - the slice axis will run through them. clear will clear the first point.

truncate polytope

Slice the polytope in two with the slice plane and keep one piece.
  • Click begin.
  • By default the piece containing the center of the polytope is kept. Select keep outer to keep the other, outer, piece.
  • Use any control to move the slice plane and truncate at will, you can always undo. When done, hit finish, or cancel to erase the carnage.
  • When you've tired of your creation, press polytopes... to return to an officially-sanctioned polytope.

promote slice

Replaces the current polytope with the current slice, which has dimension one less. You can now slice it, differentiate its interior and exterior rendering, and examine its cells. For instance, you may want to create and study new 4-dimensional polytopes as slices of 5-dimensional ones, etc. Click Cancel to undo, or polytopes... to start fresh.
Note: In the midst of carrying out the above operations, you can always rotate the polytope to get a better view.

cells...

While terminology doesn't seem to have standardized, we'll follow at least some sources and refer to the constituents of a polytope as cells, the constituents of dimension d as d-cells. Thus vertices are 0-cells, edges are 1-cells, (two-dimensional) faces are 2-cells. The constituents that separate a polytope's interior and exterior are called facets. A 3-d polyhedron's facets are its two-dimensional faces, a 4-d polytope's facets are its 3-cells, three dimensional polyhedra. A 3-cube has 2-cubes (squares) for facets, a 4-cube has 3-cubes.

Click cells... to access the cells dialog, which lets you identify, select and highlight cells so that you can follow them as the polytope rotates.

polytopes...

Select the dimension and polytope you prefer!

the 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. I've included only one: For further information on polytopes and much more we refer you to Eric Swab's great site. Starting out, the cube is probably 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.

own window

Opens the viewer in its own movable, resizable window. Just close the window or click its corresponding button, now labelled "return to page", to return the viewer to the page.
1