/**********************************************************************************************
 *4d.h
 *
 *Header file of a 4d visualization library.
 *
 *Josh McCoy
 *October 2003
 *
 *********************************************************************************************
 *void translate4d(GLdouble m[5][5], GLdouble d1, GLdouble d2, GLdouble d3, GLdouble d4)
 *
 *Translates along any of the four axes in the transformation matrix given by the
 *first argument.  The four remaining arguments are the distance of the translations
 *according to each axis.  The matrix argument is changed and holds the results of
 *the transformation.
 *
 *********************************************************************************************
 *void translate4d(GLdouble m[5][5], GLdouble p[5])
 *
 *Similar to the other translate4d function. Instead of the translation
 *given in four GLdoubles, it is given in the form of a homogeneous
 *coordinate vector.  The matrix argument is changed and holds the resultant
 *transformation matrix.
 *
 *********************************************************************************************
 *void rotate4d(GLdouble m[5][5], GLdouble theta, GLint axis)
 *
 *Changes a tranformation matrix to reflect a rotation around an axis.  The
 *first argument is the matrix to be changed.  The second argument is the angle
 *of rotation from the axis in degrees.  The last argument is the axis to rotate
 *around in dimension order (0 rotates around the x-axis, 1 rotates around the y-axis,
 *2 rotates around the z-axis, and 3 rotates around the fourth dimensional axis).
 *
 *********************************************************************************************
 *void multMatrix4d(GLdouble m1[5][5], GLdouble m2[5][5], GLdouble m3[5][5])
 *
 *Multiples the first matrix argument times the second matrix argument and
 *places the result in the thrid matrix agrument.
 *
 *********************************************************************************************
 *void perspectiveDivision(GLdouble p[5])
 *
 *Performs perspective division on the homogenous coordinate agrument.
 *The coordinate is changed and stores the result.
 *
 *********************************************************************************************
 *void matrixVectorProduct(GLdouble m[5][5], GLdouble p[5])
 *
 *Multiples the matrix agrument by the homogeneous coordinate.
 *The result is the changed coordinate.
 *
 *********************************************************************************************
 *void printCoordinate(GLdouble p[5])
 *
 *Prints the given coordinate to stdout.
 *
 *********************************************************************************************
 *void printMatrix(GLdouble m[5][5])
 *
 *Prints the given matrix to stdout.
 *
 **********************************************************************************************/

#include <iostream>
#include <math.h>
#include <windows.h>
#include <GL/gl.h>
#include <GL/glut.h>


using namespace std;

#define PI 3.141592
//constant that produces radians when multiplied by a degree value (PI/180)
#define TO_RADIANS 0.017453292519943295769236907684886

void translate4d(GLdouble m[5][5], GLdouble d1, GLdouble d2, GLdouble d3, GLdouble d4);

void translate4d(GLdouble m[5][5], GLdouble p[5]);

void rotate4d(GLdouble m[5][5], GLdouble theta, GLint axis);

void multMatrix4d(GLdouble m1[5][5], GLdouble m2[5][5], GLdouble m3[5][5]);

void perspectiveDivision(GLdouble p[5]);

void matrixCoordinateProduct(GLdouble m[5][5], GLdouble p[5], GLdouble r[5]);

void printCoordinate(GLdouble p[5]);

void printMatrix(GLdouble m[5][5]);



//@#$@#$@#$@#$@
