{VERSION 1 0 "X11/Motif" "1.0"}{GLOBALS 3 1}{FONT 0 "-adobe-helve
tica-bold-r-normal--*-180-*-*-*-*-*-*" "helvetica" "Helvetica-Bol
d" 8 18 0 "Helvetica-Bold" 18}{FONT 1 "-adobe-new century schoolb
ook-bold-i-normal--*-180-*-*-*-*-*-*" "new century schoolbook" "T
imes-BoldItalic" 8 18 96 "Times-BoldItalic" 18}{FONT 2 "-*-Courie
r-bold-r-normal--*-110-*-*-m-*-*-*" "Courier" "Courier-Bold" 8 11
 192 "Courier-Bold" 11}{FONT 3 "-adobe-helvetica-bold-r-normal--*
-240-*-*-*-*-*-*" "helvetica" "Helvetica-Bold" 8 24 0 "Helvetica-
Bold" 24}{FONT 4 "-adobe-helvetica-bold-r-normal--*-240-*-*-*-*-*
-*" "helvetica" "Helvetica-Bold" 8 24 0 "Helvetica-Bold" 24}{FONT
 5 "-adobe-helvetica-bold-r-normal--*-240-*-*-*-*-*-*" "helvetica
" "Helvetica-Bold" 8 24 0 "Helvetica-BoldOblique" 24}{FONT 6 "-ad
obe-helvetica-bold-r-normal--*-240-*-*-*-*-*-*" "helvetica" "Helv
etica-Bold" 8 24 0 "Helvetica-Bold" 24}{FONT 7 "-adobe-helvetica-
bold-r-normal--*-140-*" "helvetica" "Helvetica-Bold" 8 14 0 "Helv
etica-Bold" 14}{SCP_R 1 0 81{COM_R 2 0{TEXT 1 34 "MAPLE WORKSHEET
 #3: 2d Animations."}}{SEP_R 3 0}{COM_R 4 0{TEXT 1 26 "We display
 only one frame."}}{SEP_R 5 0}{INP_R 6 0 "> "{TEXT 0 12 "with(plo
ts):"}}{SEP_R 7 0}{INP_R 8 0 "> "{TEXT 0 86 "animate(sin(x*t), x=
-10..10,t=1..2,\012thickness=3, color=red, numpoints=100, frames=
20);"}}{SEP_R 9 0}{INP_R 10 0 "> "{TEXT 0 115 "animate([t+cos(u),
sin(u),u=0..2*Pi], t=0..2*Pi,\012axes=none, color=red, thickness=
3, scaling=constrained, frames=20);"}}{SEP_R 11 0}{INP_R 12 0 "> \+
"{TEXT 0 143 "animate(\012\{ [t+cos(u),1+sin(u),u=0..2*Pi], [u,0,
u=-1..2*Pi+1] \}, t=0..2*Pi,\012axes=none, color=cyan, thickness=
3, scaling=constrained, frames=20);"}}{SEP_R 13 0}{INP_R 14 0 "> \+
"{TEXT 0 191 "animate(\012\{ [cos(t)+0.05*cos(u),sin(t)+0.05*sin(
u), u=0..2*Pi],\012   [(u-0.05)*cos(t),(u-0.05)*sin(t),u=0..1] \}
, t=0..2*Pi,\012axes=none, color=yellow, thickness=3, scaling=con
strained, frames=20);"}}{SEP_R 15 0}{INP_R 16 0 "> "{TEXT 0 122 "
animate([cos(t)*u,sin(t)*u,u=-2..2], t=0..2*Pi,\012color=aquamari
ne, axes=none, thickness=3, scaling=constrained, frames=20);"}}
{SEP_R 17 0}{INP_R 18 0 "> "{TEXT 0 117 "animate([cos(t*u),sin(t*
u),u=0..1], t=0..2*Pi,\012axes=none, color=yellow, thickness=3, s
caling=constrained, frames=20);"}}{SEP_R 19 0}{INP_R 20 0 "> "
{TEXT 0 150 "animate(\012\{ [cos(t)*u,sin(t)*u,u=0..1], [cos(t*u)
,sin(t*u),u=0..1] \}, t=0..2*Pi,\012axes=none, color=yellow, thic
kness=3, scaling=constrained, frames=20);"}}{SEP_R 21 0}{COM_R 22
 0{TEXT 1 24 "Animate the the cycloid:"}}{SEP_R 23 0}{INP_R 24 0 
"> "{TEXT 0 109 "rollonline := animate(\012\{ [t+cos(u),1+sin(u),
u=0..2*Pi], [u,0,u=0..3*Pi] \}, t=0..3*Pi,\012color=cyan, frames=
20):"}}{SEP_R 25 0}{INP_R 26 0 "> "{TEXT 0 66 "display(rollonline
, \012thickness=3, axes=none, scaling=constrained);"}}{SEP_R 27 0
}{INP_R 28 0 "> "{TEXT 0 34 "P:=(t,l)->[t-l*sin(t),1-l*cos(t)]:"}
}{SEP_R 29 0}{INP_R 30 0 "> "{TEXT 0 163 "cyc := l->animate(\012\
{ [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],\012   [P(t*u,l)[1], P(t*u,l)[2], u=0..1] \}, t=0..3*Pi,\012c
olor=red, frames=20):"}}{SEP_R 31 0}{INP_R 32 0 "> "{TEXT 0 92 "d
isplay(\{rollonline,cyc(2)\},\012insequence=false, thickness=3, a
xes=none, scaling=constrained);"}}{SEP_R 33 0}{COM_R 34 0{TEXT 1 
27 "Animate the the epicycloid:"}}{SEP_R 35 0}{INP_R 36 0 "> "
{TEXT 0 150 "rolloncirc := r->animate(\012\{ [(1+r)*cos(t)+r*cos(
u),(1+r)*sin(t)+r*sin(u),u=0..3*Pi],\012   [cos(u),sin(u),u=0..2*
Pi]\}, t=0..2*Pi,\012color=cyan, frames=20):"}}{SEP_R 37 0}{INP_R
 38 0 "> "{TEXT 0 88 "display(rolloncirc(1/2),\012insequence=fals
e,\012thickness=3, axes=none, scaling=constrained);"}}{SEP_R 39 0
}{INP_R 40 0 "> "{TEXT 0 74 "Q:=(t,r,l)->[(1+r)*cos(t)-l*cos((1+1
/r)*t),(1+r)*sin(t)-l*sin((1+1/r)*t)]:"}}{SEP_R 41 0}{INP_R 42 0 
"> "{TEXT 0 193 "epicyc := (r,l)->animate(\012\{ [u*Q(t,r,l)[1]+(
1-u)*Q(t,r,0)[1],u*Q(t,r,l)[2]+(1-u)*Q(t,r,0)[2],u=0..1],\012   [
Q(t*u,r,l)[1],Q(t*u,r,l)[2],u=0..1] \}, t=0..2*Pi,\012numpoints=2
00, color=red, frames=20):"}}{SEP_R 43 0}{INP_R 44 0 "> "{TEXT 0 
106 "display(\{rolloncirc(1/2),epicyc(1/2,3/2)\},\012insequence=f
alse, thickness=3, axes=none, scaling=constrained);"}}{SEP_R 45 0
}{INP_R 46 0 "> "{TEXT 0 104 "display(\{rolloncirc(1/4),epicyc(1/
4,2)\},\012insequence=false, thickness=3, axes=none, scaling=cons
trained);"}}{SEP_R 47 0}{COM_R 48 0{TEXT 1 28 "Animate the the hy
pocycloid:"}}{SEP_R 49 0}{INP_R 50 0 "> "{TEXT 0 148 "rollincirc \+
:= r->animate(\012\{ [(1-r)*cos(t)+r*cos(u),(1-r)*sin(t)+r*sin(u)
,u=0..3*Pi],\012[cos(u),sin(u),u=0..2*Pi] \}, t=0..2*Pi,\012color
=cyan, frames=20):"}}{SEP_R 51 0}{INP_R 52 0 "> "{TEXT 0 88 "disp
lay(rollincirc(1/2),\012insequence=false, thickness=3, axes=none,
 scaling=constrained);"}}{SEP_R 53 0}{INP_R 54 0 "> "{TEXT 0 74 "
R:=(t,r,l)->[(1-r)*cos(t)+l*cos((1-1/r)*t),(1-r)*sin(t)+l*sin((1-
1/r)*t)]:"}}{SEP_R 55 0}{INP_R 56 0 "> "{TEXT 0 191 "hypocyc := (
r,l)->animate(\012\{ [u*R(t,r,l)[1]+(1-u)*R(t,r,0)[1],u*R(t,r,l)[
2]+(1-u)*R(t,r,0)[2],u=0..1],\012[R(t*u,r,l)[1],R(t*u,r,l)[2],u=0
..1] \}, t=0..2*Pi,\012numpoints=200, color=red, frames=20):"}}
{SEP_R 57 0}{INP_R 58 0 "> "{TEXT 0 137 "display(\{rollincirc(1/4
),hypocyc(1/4,1/4)\},\012insequence=false, thickness=3, axes=none
, scaling=constrained,\012title=`The Astroid Animated`);"}}{SEP_R
 59 0}{INP_R 60 0 "> "{TEXT 0 107 "display(\{rollincirc(1/3),hypo
cyc(1/3,2/3)\},\012insequence=false, thickness=3, axes=none, scal
ing=constrained);"}}{SEP_R 61 0}{COM_R 62 0{TEXT 1 35 "Rotate the
 wireframe of a pentagon:"}}{SEP_R 63 0}{INP_R 64 0 "> "{TEXT 0 
217 "animate(\012\{ seq([u*cos(t+2*k*Pi/5)+(1-u)*cos(t+2*(k+1)*Pi
/5),\012            u*sin(t+2*k*Pi/5)+(1-u)*sin(t+2*(k+1)*Pi/5), \+
u=0..1], k=0..4) \}, t=0..2*Pi,\012frames=20, color=cyan, thickne
ss=3, axes=none, scaling=constrained);"}}{SEP_R 65 0}{INP_R 66 0 
"> "{TEXT 0 50 "A:=t->array([ [cos(t),-sin(t)],[sin(t),cos(t)] ])
:"}}{SEP_R 67 0}{INP_R 68 0 "> "{TEXT 0 40 "v:=(k,n)->[cos(2*k*Pi
/n),sin(2*k*Pi/n)]:"}}{SEP_R 69 0}{INP_R 70 0 "> "{TEXT 0 32 "w:=
(t,k,n)->evalm(A(t)&*v(k,n)):"}}{SEP_R 71 0}{INP_R 72 0 "> "{TEXT
 0 205 "animate(\012\{ seq([evalm(u*w(t,k,5)+(1-u)*w(t,k+1,5))[1]
,\012            evalm(u*w(t,k,5)+(1-u)*w(t,k+1,5))[2], u=0..1] ,
k=0..4) \}, t=0..2*Pi,\012frames=20, color=cyan, thickness=3, axe
s=none, scaling=constrained);"}}{SEP_R 73 0}{INP_R 74 0 "> "{TEXT
 0 134 "display([ seq( polygonplot([ seq(w(2*l*Pi/50,k,5), k=0..4
)]), l=0..50)],\012insequence=true, color=cyan, axes=none, scalin
g=constrained);"}}{SEP_R 75 0}{INP_R 76 0 "> "{TEXT 0 443 "colvec
 := (a,b,r,theta,c1,c2,c3)->display(\012\{ polygonplot(\012[ [a,b
], [a+0.85*r*cos(theta), b+0.85*r*sin(theta)] ],\012style=line, t
hickness=3), \012polygonplot(\012[ [a+r*cos(theta), b+r*sin(theta
)],\012  [a+r*cos(theta)-0.15*r*cos(theta-Pi/12),\012   b+r*sin(t
heta)-0.15*r*sin(theta-Pi/12)],\012  [a+r*cos(theta)-0.15*r*cos(t
heta+Pi/12),\012   b+r*sin(theta)-0.15*r*sin(theta+Pi/12)] ], \01
2thickness=3) \},\012style=line, scaling=constrained, color=COLOR
(RGB,c1,c2,c3) ):"}}{SEP_R 77 0}{INP_R 78 0 "> "{TEXT 0 60 "colve
c0 := (r,theta,c1,c2,c3)->colvec(0,0,r,theta,c1,c2,c3):"}}{SEP_R 
79 0}{INP_R 80 0 "> "{TEXT 0 100 "display([seq(colvec0(1,2*k*Pi/2
0,0,1,1),k=0..20)],\012insequence=true, axes=none, scaling=constr
ained);"}}{SEP_R 81 0}{INP_R 82 0 "> "{TEXT 0 0 ""}}}{END}
