#include #include #include #define KCLR "\x1B[0m" #define KRED "\x1B[31m" #define KGRN "\x1B[32m" struct coords{ int x, y; }; void pointDistance (coords prev, coords next, coords &edges); int xProd(coords prev, coords next); bool isConcave(int[], int size); void display(); int main(int argc,char *argv[]){ int nrVertices= 6; int xpSum [nrVertices]; coords edgeDist [nrVertices]; coords vertices [nrVertices]= {{0,0},{1,0},{2,1},{3,0},{3,3},{0,3}}; fprintf(stderr, "\t#Calculating Edge distance#\n"); //calculate point distance for adjacent edges for (size_t ctr= 0; ctr 0){ hasPos= 1; fprintf(stderr, "Positive\n"); } else{ hasNeg= 1; fprintf(stderr, "Negative\n"); } } if (hasPos && hasNeg) return 1; return 0; } void display(){ glClear(GL_COLOR_BUFFER_BIT); //flush gl glColor3f(0.0, 0.0, 1.0); //blue line color //outer pentagram, clockwise glBegin(GL_LINE_LOOP); glVertex2i(0,0); glVertex2i(100,0); glVertex2i(200,100); glVertex2i(300,0); glVertex2i(300,300); glVertex2i(0,300); glEnd(); glFlush(); //force immidiate display }