This program lets you rotate a tesseract and a 3-sphere in four dimensions.

A tesseract is a four dimensional cube like object. Basically, a tesseract is formed from a cube in a same way as a cube is formed from a square or a square is formed from a line.

A 3-sphere is a four dimensional sphere like object. Its form is much more complex than the one of a tesseract and is much more difficult to understand (even I don't really understand it).
The rendering of the 3-sphere is executed so that the program draws dots that are on the surface of the 3-sphere and as the dots move they leave a trail behind.

The program uses cross-eyed 3D rendering. Basically if you can cross your eyes so that the two images next to each other combine so that the resulting image is sharp you will see the image in real 3D.

NOTE:
The interesting four dimensional transformation and projection stuff can be found in coordinate.cpp
There is also an option for parallel 3D instead of cross-eyed 3D
  This option can be enabled in global.hpp
  If you use parallel 3D you should probably lower the resolution in main.cpp



Running the program:
The program comes with Windows and Linux binaries that should both run out of the box. Note that you must have your graphic card drivers installed and support for OpenGL 1.1.
The Windows binary is linked dynamically to the SDL.dll provided and the Linux binary is linked statically and should not need installation of additional libraries.
Note that the Linux binary is not compiled with the provided Makefile that instead uses dynamic linking. If the Linux binary doesn't work try building your own.



Compiling instructions:
Linux users may use the provided Makefile to compile the program. You must have the dev package of SDL installed to compile.
If you don't use the Makefile (like on Windows) you should link at least lglu32, lopengl32, lSDL and lSDLmain (and lmingw32 if using MinGW).



You may use all the source codes for anything you want.