Maple's animation capability affords you yet another way to put three
dimensions on a two-dimensional plot. Suppose that we'd like to understand the
height reached by the ball as a function of time and initial angle. We
originally approached this problem by putting three different curves on the
same plot. With animation, we can put an arbitrary number of curves on
successive plots.
The functions that do animation are contained in the plots library. You
will be able to use them only if you first do this:
 | with(plots); |
Now let's animate the problem described above:
 | animate(height(50, theta, `time (sec)`),
`time (sec)`=0..10,
theta=0..Pi/2); |
Notice that we are specifying two ranges. The first range gives the range of
the horizontal axis, and the second range gives the range of the animation.
An animation window should appear. By clicking on the various buttons, you can
``play'' the animation. (Click on the question mark button to get started.)
What you will see is height as a function of time as the initial angle varies
from 0 to 90 degrees.
Every ``frame'' in the animation gives a plot of height as a function of time
for some angle. When you play the animation, the angle varies in discrete
steps between 0 and
. You can control the number of steps, or frames,
by setting the frame parameter. For example, to obtain 15 frames:
 | animate(height(50, theta, `time (sec)`),
`time (sec)`=0..10,
theta=0..Pi/2, frames=15); |
Parametric plots can also be animated. Let's animate the trajectory of the
ball for different angles:
 | animate([distance(50, theta, t),
height(50, theta, t),
t=0..10],
theta=0..Pi/2); |
Here, each frame shows a complete trajectory for a specific angle.
Joseph L. Zachary
Hamlet Project
Department of Computer Science
University of Utah