this is my code…
/* CGR331 Intermediate Computer Graphics I Fall 2002 Lesson 1
Instructor: Douglas Easterly deaster@syr.edu 229 Shaffer
Example program 2b1: starting simple: making a circle*/
#include <cgr331_02.h>
/* this will draw a cirlce in any program - but you would probably remove the glClear and glFlush as they would be put specifically at the beginning and end of your drawing code respectively*/
void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 0.0);
drawSolidCircle(250.0, 250.0, 50.0);
glColor3f(1.0, 0.8, 0.0);
drawSolidCircle(50.0, 30.0, 20.0);
glColor3f(1.0, 0.7, 0.0);
drawSolidCircle(100.0, 30.0, 20.0);
glColor3f(1.0, 0.6, 0.0);
drawSolidCircle(150.0, 30.0, 20.0);
glColor3f(1.0, 0.5, 0.0);
drawSolidCircle(200.0, 30.0, 20.0);
glColor3f(1.0, 0.4, 0.0);
drawSolidCircle(250.0, 30.0, 20.0);
glColor3f(1.0, 0.3, 0.0);
drawSolidCircle(300.0, 30.0, 20.0);
glColor3f(1.0, 0.2, 0.0);
drawSolidCircle(350.0, 30.0, 20.0);
glColor3f(1.0, 0.1, 0.0);
drawSolidCircle(400.0, 30.0, 20.0);
glColor3f(1.0, 0.0, 0.0);
drawSolidCircle(450.0, 30.0, 20.0);
glFlush();
}
/… myReshape …/
void myReshape(int w, int h){
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 500.0, 0.0, 500.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
/… main …/
int main(int argc, char** argv){
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(500.0, 500.0);
glutCreateWindow (“CGR topic 2B_1”);
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
glutMainLoop();
}
i want the circles to rotate around the larger circle in the middle and end up one behind the other in the center of the larger cirlce, which is set on the center axis