Práctiica 2: Ejercicio 3
#include<stdlib.h> #include<math.h> #include<stdio.h> #include<windows.h> #include <GL/glut.h> GLsizei wh = 600, ww = 800,wx,wy, wx1=800, wy1=600; char* image; int count=0; int sub_menu; int draw; int i,j,k; float a[100][2], b[100][2]; int m, n; int pol; int flag=0, flag1; int fill=0; float textx,texty, textz=0.0; float a1=0, a2=0, a3=0, b1=0, b2=0, b3=0; int size=1; int save=0; float posx, posy; void *currentfont; FILE *fptr; char fname[20]; int s=0; int wel=0; void drawstring(float x,float y,float z,char *string) { char *c; glRasterPos3f(x,y,z); for(c=string;*c!='\0';c++) { glutBitmapCharacter(currentfont,*c); } } void setFont(void *font) { currentfont=font; } void drawpoint(int x, int y) { y=wh-y; if(x>wh/10+1 && wh/10<y && y<wh-31) { glPointSize(size); glBegin(GL_POINTS); glVertex2f(x, y); glEnd(); glFlush(); } } void pa...