/* plan.c Laura Toma What it does: */ #include "geom.h" #include "rtimer.h" #include #include #include #include #ifdef __APPLE__ #include #else #include #endif GLfloat red[3] = {1.0, 0.0, 0.0}; GLfloat green[3] = {0.0, 1.0, 0.0}; GLfloat blue[3] = {0.0, 0.0, 1.0}; GLfloat black[3] = {0.0, 0.0, 0.0}; GLfloat white[3] = {1.0, 1.0, 1.0}; GLfloat gray[3] = {0.5, 0.5, 0.5}; GLfloat yellow[3] = {1.0, 1.0, 0.0}; GLfloat magenta[3] = {1.0, 0.0, 1.0}; GLfloat cyan[3] = {0.0, 1.0, 1.0}; GLint fillmode = 0; /* forward declarations of functions */ void display(void); void keypress(unsigned char key, int x, int y); void main_menu(int value); void timerfunc(); /* ******************** */ /* global variables */ /* ******************** */ const int WINDOWSIZE = 500; point2D start_pos, end_pos; /* start and end position of the robot */ /* the current position of the robot. Will be be updated by next_move() */ point2D current_pos; /* the array of obstacles */ int nobstacles; polygon2D* obst; void print_obstacle(polygon2D p) { printf("n=%d : ", p.n); int i; for (i=0; i