[HOME] MAM2000 (Essays/SciAm) [Prev][Top][Up][Skip][Next]

The Vertexes of the Hypercube

The 16 vertexes of the hypercube in the program are numbered from 0 to 15 according to a simple scheme. If each number is rewritten in binary form and converted into an array of four bits, a miniature coordinate system emerges. The binary digits of 13, for example, are 1 (that is, one 8), 1 (one 4), 0 (zero 2's) and 1 (one 1). The binary number can then be written as the array (1, 1, 0, 1), which almost gives a practical coordinate system for the initial position of the hypercube. (It is not a position that resembles a cube inside another cube.) To convert the binary array into useful coordinates, change the O's to -1's and multiply each member of the array by a number large enough to generate an image of practical size on the display screen of the Computer. If the multiplier is 10, for example, the coordinates of vertex 13 are (10,10,-10,10).

Dimensions seem to creep in everywhere as HYPERCUBE is written. A two-dimensional matrix, or array, called vert preserves the vertexes as they are initially defined. Since there are 16 vertexes with four coordinates each, vert is a 16-by-4 matrix of 64 numbers; vert(i,j) is the jth coordinate of the ith vertex. The program HYPERCUBE holds the matrix vert inviolate; vert is defined at the beginning of the program and its contents are then transferred to a second 16-by-4 matrix called cube. The matrix cube can be thought of as a working matrix; its contents are continually altered by the rotations carried out in the program.


Mathematics Awareness Month is sponsored each year by the Joint Policy Board for Mathematics to recognize the importance of mathematics through written materials and an accompanying poster that highlight mathematical developments and applications in a particular area.