1. glBegin(GL_QUAD_STRIP);
  2.  
  3. float theta;
  4. float phi;
  5.  
  6. for (phi = 0; phi < M_PI; phi += STEP)
  7. for (theta = 0; theta < 2.0 * M_PI; theta += STEP)
  8. {
  9. glVertex3f(RADIUS * sin(phi) * cos(theta), RADIUS * sin(phi) * sin(theta), RADIUS * cos(phi));
  10. glVertex3f(RADIUS * sin(phi + STEP) * cos(theta), RADIUS * sin(phi + STEP) * sin(theta), RADIUS * cos(phi + STEP));
  11. fprintf(stderr, "%f, %f\n", phi, theta);
  12. }
  13.  
  14. glEnd();