next up previous
Next: main Up: Code Previous: Code

global variables and constants

My program required a lot of data to be stored globally in order to save having to send it all as parameters back and forth between each individual function. The comments generally defin what the different data structures are used for in the program. The exact specifics of how they are used willl be described as each on reappears in the code.

#include <stdlib.h>
#include <GL/glut.h>
#include <iostream.h>
#include <time.h> 

double pi = 3.1415926535898;
double winsize(600); 	// size of square window
int xo=0, yo=0; 		// variables for
int xrot=0, yrot=0;  	// rotation of screen
int F=20; 				// number of frames for spheres and cylinders
bool cyl[] = {true, false, false, true}; // decides whether or not a cyllinder
						// is drawn connecting the knuckle and the palm
int spread[4];			// angle of spread between the different fingers
double joint[5][4];		// sizes of the joints of each finger
double dist[5][3];		// length of each digit
int angle[5][3];		// angle at each joint

GLUquadricObj *qobj;



Michael Hull 2003-06-11