{VERSION 5 0 "SUN SPARC SOLARIS" "5.0" }
{USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 
1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }
{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "New century schoolbook" 1 
18 0 0 0 0 1 1 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }
{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 
1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Headi
ng 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }1 0 
0 0 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 2" 3 4 1 {CSTYLE "" -1 -1 "
" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 4 4 0 0 0 0 0 0 -1 0 }
{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 
1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 
1 {CSTYLE "" -1 -1 "Helvetica" 1 18 0 0 0 0 2 1 2 0 0 0 0 0 0 1 }0 0 
0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" 
-1 -1 "Courier" 1 11 0 0 0 0 2 1 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 
0 0 0 0 -1 0 }{PSTYLE "R3 Font 3" -1 258 1 {CSTYLE "" -1 -1 "Helvetica
" 1 24 0 0 0 0 2 1 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }
{PSTYLE "R3 Font 4" -1 259 1 {CSTYLE "" -1 -1 "Helvetica" 1 24 0 0 0 
0 2 1 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Fo
nt 5" -1 260 1 {CSTYLE "" -1 -1 "Helvetica" 1 24 0 0 0 0 2 1 2 0 0 0 
0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 6" -1 261 
1 {CSTYLE "" -1 -1 "Helvetica" 1 24 0 0 0 0 2 1 2 0 0 0 0 0 0 1 }0 0 
0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 7" -1 262 1 {CSTYLE "" 
-1 -1 "Helvetica" 1 14 0 0 0 0 2 1 2 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 
0 0 0 0 0 -1 0 }{PSTYLE "" 0 263 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 
0 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }}
{SECT 0 {PARA 263 "" 0 "" {TEXT 256 34 "MAPLE WORKSHEET #3: 2d Animati
ons." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 23 "Load the plots package:" 
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "with(plots):\nsetoptions(s
caling=constrained,axes=none):" }}{PARA 7 "" 1 "" {TEXT -1 43 "Warning
, the name arrow has been redefined\n" }}}}{SECT 1 {PARA 3 "" 0 "" 
{TEXT -1 31 "Animate a simple function plot:" }}{EXCHG {PARA 0 "> " 0 
"" {MPLTEXT 1 0 86 "animate(sin(x*t), x=-10..10,t=1..2,\nthickness=3, \+
color=red, numpoints=200, frames=20);" }}}}{SECT 1 {PARA 3 "" 0 "" 
{TEXT -1 25 "Animate parametric plots:" }}{SECT 1 {PARA 4 "" 0 "" 
{TEXT -1 46 "Animate a rolling circle as a parametric plot:" }}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "animate([t+cos(u),sin(u),u=0..2*Pi]
, t=0..2*Pi,\ncolor=red, thickness=3, frames=20);" }}}}{SECT 1 {PARA 
4 "" 0 "" {TEXT -1 21 "With background plot:" }}{EXCHG {PARA 0 "> " 0 
"" {MPLTEXT 1 0 132 "display(\{\nanimate([t+cos(u),1+sin(u),u=0..2*Pi]
, t=0..2*Pi,\ncolor=red, thickness=3, frames=20),\nplot(0,x=-1..2*Pi+1
,color=blue) \n\});" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 20 "Combined
 animations:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 165 "animate(\{ \+
\n[cos(t)+0.05*cos(u),sin(t)+0.05*sin(u), u=0..2*Pi,color=red],\n[(u-0
.05)*cos(t),(u-0.05)*sin(t),u=0..1] \n\}, \nt=0..2*Pi,\ncolor=red, thi
ckness=3, frames=20);" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 17 "Rotati
ng segment:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "animate([cos(
t)*u,sin(t)*u,u=-2..2], t=0..2*Pi,\ncolor=aquamarine, thickness=3, fra
mes=20);" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 28 "Drawing curves by \+
animation:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "animate([cos(t
*u),sin(t*u),u=0..1], t=0..2*Pi,\ncolor=red, thickness=3, frames=20);
" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 32 "Animation with multiple disp
lay:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 151 "display(\{\nanimate
(\n[cos(t)*u,sin(t)*u,u=0..1], t=0..2*Pi,\ncolor=magenta),\nanimate(\n
[cos(t*u),sin(t*u),u=0..1], t=0..2*Pi,\ncolor=blue)\n\}, \nthickness=3
);" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Animate the the cycloid:
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "circle := animate(\n[t+c
os(u),1+sin(u),u=0..2*Pi], t=0..3*Pi,\ncolor=cyan, frames=20):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "base := plot(0, x=-1..3*Pi+1
, color=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "display(
\{circle, base\},\nthickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 34 "P:=(t,l)->[t-l*sin(t),1-l*cos(t)]:" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 162 "cyc := l->animate(\{\n[u*P(t,l)[1]+(1-u)
*P(t,0)[1], u*P(t,l)[2]+(1-u)*P(t,0)[2], u=0..1],\n   [P(t*u,l)[1], P(
t*u,l)[2], u=0..1] \n\},t=0..3*Pi,\ncolor=red, frames=20):" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "display(\{circle, base, cyc(1)\},\n
thickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "display(\{
circle, base, cyc(.5)\},\nthickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 47 "display(\{circle, base, cyc(1.5)\},\nthickness=3);" }
}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 27 "Animate the the epicycloid:" }
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 121 "rolloncircle := r->animate
( [(1+r)*cos(t)+r*cos(u),(1+r)*sin(t)+r*sin(u),\nu=0..3*Pi], \nt=0..2*
Pi,\ncolor=cyan, frames=20):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 57 "basecircle:= plot([cos(u),sin(u),u=0..2*Pi], color=blue):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "display(\{ basecircle, rollo
ncircle(1/2)\},\nthickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 
1 0 76 "Q:=(t,r,l)->\n[(1+r)*cos(t)-l*cos((1+1/r)*t),\n(1+r)*sin(t)-l*
sin((1+1/r)*t)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 194 "epicyc
le := (r,l)->\nanimate(\{ \n[u*Q(t,r,l)[1]+(1-u)*Q(t,r,0)[1],\nu*Q(t,r
,l)[2]+(1-u)*Q(t,r,0)[2],u=0..1],\n[Q(t*u,r,l)[1],Q(t*u,r,l)[2],u=0..1
] \n\},t=0..2*Pi,\nnumpoints=200, color=red, frames=20):" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "display(\{basecircle, rolloncircle(
1/2),epicycle(1/2,3/2)\},\nthickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 70 "display(\{basecircle,\nrolloncircle(1/4),epicycle(1/4
,2)\},\nthickness=3);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 28 "Animat
e the the hypocycloid:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "r
ollincircle := r->animate(\n[(1-r)*cos(t)+r*cos(u),(1-r)*sin(t)+r*sin(
u),\nu=0..3*Pi],\nt=0..2*Pi,\ncolor=cyan, frames=20):" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 53 "display(basecircle, \nrollincircle(
1/2),\nthickness=3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "R:=
(t,r,l)->[(1-r)*cos(t)+l*cos((1-1/r)*t),\n(1-r)*sin(t)+l*sin((1-1/r)*t
)]:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 195 "hypocycle := (r,l)-
>animate(\n\{ [u*R(t,r,l)[1]+(1-u)*R(t,r,0)[1],\nu*R(t,r,l)[2]+(1-u)*R
(t,r,0)[2],u=0..1],\n[R(t*u,r,l)[1],R(t*u,r,l)[2],u=0..1] \}, \nt=0..2
*Pi,\nnumpoints=200, color=red, frames=20):" }}}{EXCHG {PARA 0 "> " 0 
"" {MPLTEXT 1 0 121 "display(\{basecircle,\nrollincircle(1/4),hypocycl
e(1/4,1/4)\},\ninsequence=false, thickness=3,\ntitle=`The Astroid Anim
ated`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 73 "display(\{baseci
rcle,\nrollincircle(1/3),hypocycle(1/3,2/3)\},\nthickness=3);" }}}}
{SECT 1 {PARA 3 "" 0 "" {TEXT -1 19 "Rotate  a pentagon:" }}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 198 "with(plottools):\nrotpentagon := t
->\nrotate(\npolygonplot([\nseq([cos(2*k*Pi/5), sin(2*k*Pi/5)], k=0..4
)\n], color=cyan, style=patch),\nt):\ndisplay([seq(rotpentagon(t*Pi/20
), t=0..40)],\ninsequence=true);" }}{PARA 7 "" 1 "" {TEXT -1 56 "Warni
ng, the names arrow and circle have been redefined\n" }}}}{SECT 1 
{PARA 3 "" 0 "" {TEXT -1 23 "Examples of animations:" }}{SECT 1 {PARA 
4 "" 0 "" {TEXT -1 16 "Throwing a ball:" }}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 16 "with(plottools):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 230 "display(\n[display(seq(\ndisk([i,100-i^2],3,color=re
d),\ni=-10..10),\naxes=none,tickmarks=[0,0],insequence=true),\npolygon
plot([[7,0],[13,0],[13,-3],[7,-3]],\ncolor=wheat),\npolygonplot([[-7,0
],[-13,0],[-13,-3],[-7,-3]],\ncolor=maroon)]);" }}}}{SECT 1 {PARA 4 "
" 0 "" {TEXT -1 10 "Collision:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 206 "display(\n[seq(ellipse([0,6-i],1,1),i=1..4),\nseq(ellipse([0,1/
i],1,1/i),i=1..10),\nseq(ellipse([0,1/(11-i)],1,1/(11-i)),i=1..10),\ns
eq(ellipse([0,i],1,1),i=2..5)],\ninsequence=true,\nthickness=2, color=
magenta);" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 17 "Lissajous curves:
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 100 "plot([sin(2*x),sin(3*x)
,x=0..2*Pi],numpoints=100,\nthickness=2,color=navy,title=`Lissajous cu
rve I`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 101 "plot([sin(5*x)
,sin(6*x),x=0..2*Pi],numpoints=100,\nthickness=2,color=navy,title=`Lis
sajous curve II`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 136 "anim
ate([sin(2*t*x),sin(3*t*x),t=0..2*Pi],\nx=0..1,numpoints=100,frames=32
,\nthickness=2,color=navy,title=`Lissajous curve animated III`);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 135 "animate([sin(5*t*x),sin(6*t
*x),t=0..2*Pi],\nx=0..1,numpoints=200,frames=32,\nthickness=2,color=na
vy,title=`Lissajous curve animated IV`);" }}}}{SECT 1 {PARA 4 "" 0 "" 
{TEXT -1 20 "Animation in arrays:" }}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 53 "P:=x->\nplot([sin(5*t*x/10),sin(6*t*x/10),t=0..2*Pi])
:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "A := array(1..2,1..5,
\n[[seq(P(n),n=1..5)],\n[seq(P(n),n=6..10)]]):" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 24 "display(A,\nthickness=2);" }}}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 68 "Q:=x->\nplot([sin(5*t*x/20),sin(6*t*x/20),t=
0..2*Pi],\nnumpoints=100):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 
110 "B := array(1..4,1..5,\n[[seq(Q(n),n=1..5)],\n[seq(Q(n),n=6..10)],
\n[seq(Q(n),n=11..15)],\n[seq(Q(n),n=16..20)]\n]):" }}}{EXCHG {PARA 0 
"> " 0 "" {MPLTEXT 1 0 24 "display(B,\nthickness=2);" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 60 "B := array(1..4,1..5,\n[seq([seq(Q(n+5*k)
,n=1..5)],k=0..3)]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "dis
play(B,\nthickness=2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "d
isplay([\ndisplay(seq(Q(n),n=1..20),insequence=true,thickness=2)\n]);
" }}}}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 33 "Rotate a vector and the pe
ntagon:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "rotvector:=t->\nd
isplay(arrow([0,0], [cos(t),sin(t)],.01,.1,.2, color=blue)):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 61 "display([seq(rotvector(t*Pi/
10), t=0..20)],\ninsequence=true);" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 81 "newrotvector:=t->\nrotate(\ndisplay(arrow([0,0], [1,0
],.01,.1,.2, color=blue)),\nt):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 
1 0 64 "display([seq(newrotvector(t*Pi/10), t=0..20)],\ninsequence=tru
e);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 175 "rotstructure := t -
>\nrotate(\ndisplay(\{arrow([0,0], [1.3,0],.01,.1,.2, color=blue),\npo
lygonplot([\nseq([cos(2*k*Pi/5), sin(2*k*Pi/5)], k=0..4)\n], color=cya
n, style=patch)\}),\nt):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 64 
"display([seq(rotstructure(t*Pi/10), t=0..20)],\ninsequence=true);" }}
}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 20 "Transforming curves:" }}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 219 "a:=t->\nplot([[(1-t)*sin(2*x)+t*(3
+sin(5*x)),\n       (1-t)*sin(3*x)+t*(3+sin(6*x)),\nx=0..2*Pi],\n[sin(
2*x),sin(3*x),x=0..2*Pi],\n[3+sin(5*x),3+sin(6*x),x=0..2*Pi]\n], color
=[red,blue,green],thickness=[3,2,2],numpoints=100):" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 48 "display([seq(a(t/20),t=0..20)],insequence
=true);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "display([\ndispl
ay(seq(a(t/20),t=1..19),insequence=true)\n]);" }}}{EXCHG {PARA 0 "> " 
0 "" {MPLTEXT 1 0 145 "b:=t->\nplot([[(1-t)*sin(2*x)+t*sin(5*x),\n    \+
   (1-t)*sin(3*x)+t*sin(6*x),\nx=0..2*Pi]\n], color=[red,blue,green],t
hickness=[3,2,2],numpoints=100):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 48 "display([seq(b(t/20),t=0..20)],insequence=true);" }}}
}}{MARK "11" 0 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 }{PAGENUMBERS 0 1 2 
33 1 1 }
