# # The program that animates two flying objects # input: n --- the upper bound of the arrays # x,y --- arrays 0..n, positions of object one # u,v --- arrays 0..n, positions of object two # Output: Maple animation # Animate2d1c:=proc( x::Vector, y::Vector ) local n, i, j, p, r, xmax, xmin, ymax, ymin; n := LinearAlgebra[Dimension](x); xmax:=max( seq(x[i],i=1..n)); xmin:=min( seq(x[i],i=1..n)); ymax:=max( seq(y[i],i=1..n)); ymin:=min( seq(y[i],i=1..n)); p:=array(1..n); r:=array(1..n); for i from 1 to n do p[i]:=[ seq( [x[j],y[j]], j=1..i ) ]; r[i]:=plot(p[i],xmin..xmax, ymin..ymax, axes=frame); od; plots[display]( [seq(r[i],i=1..n)], insequence=true, style=line); end;