#include<iostream.h> #include<GL/glut.h> class wcPt2D { public: GLint x,y; }; void setPixel(GLint x,GLint y) { glBegin(GL_POINTS); glVertex2i(x,y); glEnd(); } void init(void) { glClearColor(1.0,1.0,1.0,0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,200.0,0.0,150.0); } void circlePlotPoints(wcPt2D circCtr,wcPt2D circPt) { setPixel(circCtr.x+circPt.x,circCtr.y+circPt.y); setPixel(circCtr.x-circPt.x,circCtr.y+circPt.y); setPixel(circCtr.x+circPt.x,circCtr.y-circPt.y); setPixel(circCtr.x-circPt.x,circCtr.y-circPt.y); setPixel(circCtr.x+circPt.y,circCtr.y+circPt.x); setPixel(circCtr.x-circPt.y,circCtr.y+circPt.x); setPixel(circCtr.x+circPt.y,circCtr.y-circPt.x); setPixel(circCtr.x-circPt.y,circCtr.y-circPt.x ); } void circleMidpoint(wcPt2D circCtr,GLint radius) { wcPt2D circPt; GLint p=1-radius; circPt.x =0