Animation is the idle function that we registered with GLUT. We program it to have as part of its responsibility invoking the display function through the call glutPostRedisplay(). Except for pauses due to an event in the event queue, animation will be continuously called from GLUT and, in turn, the display function will be continuously generating images which we call FRAMES.

As noted in the description of our display function star, the animation is created through varying the radii on two concentric circles containing the vertices of our geometry. Thus, each frame is a little different from the previous frame by a slight change in the radii. Further, the changes to the radii are accomplished by varying count in the factor count/numberOfPartitions.

Since we want each radius to vary from 0.25 to 1.0 and back, count will vary between 0 and numberOfPartitions, counting up by 1. When count reaches numberOfPartitions, count is then decrement by -1 back to zero. Updating count in this manner is also programmed into this function.