              THREED.COM, THREED.PAS and THREED.DAT
                   A Hypercube Display Program

                          by John Banta

     This program is described in the 'Computer Recreations'  column of the April 1986 issue of 'Scientific American'.  It is a simple program, it plots the 'shadow' of a three dimensional model of a four dimensional cube.  This shadow is projected by an imaginary light source directly behind the object onto the screen.  The data file (threed.dat) contains the x,y,z and t coordinates of each of the sixteen hypercube vertices as well as the Euler trail that is used to draw the vertices of the hypercube.  It is important that the data file is in the DOS selected drive along with the program file.  I have included both a COM file for immediate execution of the program as well as a Turbo Pascal source code file for easy modification of the program.
    I have implemented a stereo pair display function in this program.  I have in fact implemented two versions of stereo displays.  The program will create a standard stereo pair where the x and z axes are rotated six degrees as well as the magazine suggested stereo pair where in the x and t axes are rotated.  In some views the distinction is slight, but in others, it is very  distinct and worth observing.  The stereo pair can either be observed on a color monitor in two colors with a standard pair of "three-d" glasses, or in monochrome by crossing your eyes and looking "through" the screen so that the left image is seen by the right eye and vice-versa until the two separate images 'meld' together into a single stereo image (this takes some practice, but is well worth the effort and once mastered can be used to view antique stereo photographs without a viewer).
     The other function of interest is a continuous loop function where a cube can be rotated in discrete mode until an interesting view is achieved, and then rotated at a set speed and through a selected angle.  This mode is exited by pressing any key.
     I hope that this program brings you some enjoyment, please feel free to alter in any way the contents of this program as well as to use any parts that may prove of use to you in any manner.  I would also appreciate any dissemination of this program through the usual free-ware/bbs channels. If you have any comments of interest feel free to leave me mail via the Sorbus RBBS 405-495-3397.  Good Luck and Happy Trails.  John Banta  
