Animating a List of Plots Maple can create an animation from a list of plots. On
ID: 3639464 • Letter: A
Question
Animating a List of Plots
Maple can create an animation from a list of plots. Once we have created a list of plots, the can be animated with the display command. To tell Maple to draw the plots as an animation instead of a single plot, a special insequence command is used. Look up the insequence in the Maple help to learn more about how this command is used with display to generate animations.
Complete the code segment used to generate the below animation.
restart;
frames:= ;
for i from 1 to 10 do
frames[ ] := plot(i*x);
end do:
anim:= (frames, ):
plots[display](anim,insequence= );
Explanation / Answer
restart: with(plots): a := 0: b := 2*Pi: c := -2: d := 2: p := 2.2: q := 5: n := 20: f := x -> sin(2*x) * cos(x) + cos(3/2*x) * sin(2*x): an1 := plot( f(x), x=a..b, y=c..d, color=RED ): an2 := animate([x, (f(q*(1-k)^2+p-p*(1-k)^2)-f(p)) / (q*(1-k)^2-p*(1-k)^2)*(x-p)+f(p), x=a..b ], k=0..0.999, view=c..d, frames=n, color=GREEN): an3 := animate([p*(1-x/(b-a))+(q*(1-k)^2+p*(1-(1-k)^2) )*x/(b-a), (f(q*(1-k)^2+p-p*(1-k)^2)-f(p))/(q*(1-k)^2-p*(1-k)^2)* (p*(1-x/(b-a))+(q*(1-k)^2+p*(1-(1-k)^2))*x/(b-a)-p)+f(p), x=a..b ], k=0..0.999, view=c..d, frames=n, color=BLUE): display(an3, an2, an1);