#include #include #include using namespace std; typedef unsigned char uchar; void disp(void); void reshape(int x,int y); void mouse(int button,int state, int x, int y); void keyb(uchar key,int x,int y); static int winx; static int winy; static double xbegin = -1.8; static double xend=1.1; static double ybegin = -1.2; static double yend=1.2; int main(int argc, char **argv){ glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); glutCreateWindow("Fractal"); glutInitWindowSize(600,600); // clear the background to white so we can see any holes glClearColor(1.0,1.0,1.0,0.0); glutDisplayFunc(disp); glutReshapeFunc(reshape); glutMouseFunc(mouse); glutKeyboardFunc(keyb); glutMainLoop(); } void disp(void){ glClear(GL_COLOR_BUFFER_BIT); // begin definition glBegin(GL_POINTS); // for each pixel on the screen for(float i=0;i