// Set animation status; call this method whenever animation status
 // changes to stop/start clock and regular animation callbacks to
 // redraw window
 public void setAnimation() {
   if (s.drawAnimation.value) {
     s.pauseClock(false);
     if (!isAnimated()) {
       setAnimation(true);
     }
   } else {
     if (isAnimated()) {
       setAnimation(false);
       s.pauseClock(true);
     }
   }
 }
  public void init(GL gl) {
    // Starts with animation turned off
    setAnimation(false);

    // --- OpenGL Initialization

    // Set background color to sky blue
    gl.glClearColor(0.58f, 0.74f, 0.98f, 0.0f);

    // Turn on Z buffer
    gl.glEnable(GL.GL_DEPTH_TEST);

    // Turn on Gouraud shaded polygons
    gl.glShadeModel(GL.GL_SMOOTH);

    // Turn on automatic normalization for normal vectors
    gl.glEnable(GL.GL_NORMALIZE);
  }