12 glClear(GL_COLOR_BUFFER_BIT);
14 glColor3f(1.0, 1.0, 1.0);
15 glutWireTorus(0.5, 3, 15, 30);
35 glClearColor(0.0, 0.0, 0.0, 1.0);
36 glColor3f(1.0, 1.0, 1.0);
38 glMatrixMode(GL_PROJECTION);
40 gluPerspective(60.0, 4.0 / 3.0, 1, 40);
42 glMatrixMode(GL_MODELVIEW);
44 gluLookAt(4, 6, 5, 0, 0, 0, 0, 1, 0);
47 int main(
int argc,
char **argv) {
48 glutInit(&argc, argv);
49 glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
52 glutInitWindowPosition(80, 80);
53 glutInitWindowSize(1000, 800);
54 glutCreateWindow(
"A Torus on a Plane");
int main(int argc, char **argv)