Animating a scene is nothing more than applying the appropriate local transformations to the objects in the scene. For instance, if we want to move a cone and a sphere, each one of them will have a corresponding local transformation that will describe its location, orientation, and scale. In the previous section, we learned that matrix stacks allow us to preserve the original Model-View transform so that we can apply the correct local transforms to each object.
Now that we know how to move objects with local transforms and matrix stacks, we should address when to apply these transforms.
If we calculate the position to apply to the cone and sphere in our example every time we call the render function, this would imply that the animation rate would depend on the speed of our rendering cycle. A slow rendering cycle would produce choppy animations and too fast...