glBegin(GL_QUAD_STRIP); float theta; float phi; for (phi = 0; phi < M_PI; phi += STEP) for (theta = 0; theta < 2.0 * M_PI; theta += STEP) { glVertex3f(RADIUS * sin(phi) * cos(theta), RADIUS * sin(phi) * sin(theta), RADIUS * cos(phi)); glVertex3f(RADIUS * sin(phi + STEP) * cos(theta), RADIUS * sin(phi + STEP) * sin(theta), RADIUS * cos(phi + STEP)); fprintf(stderr, "%f, %f\n", phi, theta); } glEnd();