public synchronized void sphere (double radius, int slices, int stacks) {
    this.radius = radius;
    this.slices = slices;
    this.stacks = stacks;

    drho = Math.PI / stacks;
    dtheta = 2.0 * Math.PI / slices;
    nsign = orientation == INSIDE ? -1.0f : 1.0f;

    /* Rendered image from Mesa is different from that of SGI reference
     * implementation, because of different vertex ordering. There is
     * visible discrepency particularly for the specular reflection with
     * GL.FLAT shading model in `accanti.c' and `accpersp.c' in redbook. 
     * Brain Paul claims both are acceptable.
     */

    switch (draw_style) {
    case FILL: sphere_fill (); break;
    case LINE:                  // fall through
    case SILHOUETTE: sphere_line (); break;
    default: throw new java.lang.Error ("");
    }
  }