{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 "-adobe-co
urier-medium-r-normal--*-140-*" "courier" "Courier" 4 14 192 "Cou
rier" 12}{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-hel
vetica-bold-r-normal--*-240-*-*-*-*-*-*" "helvetica" "Helvetica-B
old" 8 24 0 "Helvetica-BoldOblique" 24}{FONT 6 "-adobe-helvetica-
bold-r-normal--*-240-*-*-*-*-*-*" "helvetica" "Helvetica-Bold" 8 
24 0 "Helvetica-Bold" 24}{FONT 7 "-adobe-helvetica-bold-r-normal-
-*-140-*" "helvetica" "Helvetica-Bold" 8 14 0 "Helvetica-Bold" 14
}{SCP_R 1 0 91{COM_R 2 0{TEXT 1 33 "MAPLE WORKSHEET #7: 3d Animat
ions"}}{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(plots):"}}{SEP_R 7
 0}{COM_R 8 0{TEXT 1 57 "The Mobius strip is traced by a segment \+
 moving in space."}}{SEP_R 9 0}{INP_R 10 0 "> "{TEXT 0 299 "anima
te3d(\012\{ [cos(t)*y, sin(t)*y, 0], [cos(t*y), sin(t*y), 0],\012
[cos(t)*(1+x*cos(t/2)), sin(t)*(1+x*cos(t/2)), x*sin(t/2)] \}, \0
12x=-1/2..1/2, y=0..1,t=0..2*Pi,\012thickness=3, orientation=[43,
56], axes=normal, tickmarks=[0,0,0], frames=8,\012titlefont=[TIME
S,ROMAN,18], title=`Animating the Mobius Strip I`);"}}{SEP_R 11 0
}{INP_R 12 0 "> "{TEXT 0 282 "animate3d(\012[cos(t*y)*(1+x*cos(t*
y/2)), sin(t*y)*(1+x*cos(t*y/2)), x*sin(t*y/2)],\012x=-1/2..1/2, \+
y=0..1, t=0..2*Pi,\012color=y, style=patchnogrid, scaling=constra
ined, orientation=[43,56],\012axes=normal, tickmarks=[0,0,0],\012
titlefont=[TIMES,ROMAN,18], title=`Animating the Mobius Strip II`
);"}}{SEP_R 13 0}{INP_R 14 0 "> "{TEXT 0 289 "animate3d(\012[cos(
t*y)*(1+x*cos(4*t*y)), sin(t*y)*(1+x*cos(4*t*y)), x*sin(4*t*y)],\
012x=-1/2..1/2, y=0..1, t=0..2*Pi,\012color=y, grid=[5,60], style
=patchnogrid, scaling=constrained,\012orientation=[43,56], axes=n
ormal, tickmarks=[0,0,0],\012titlefont=[TIMES,ROMAN,18], title=`V
ariations on the Theme`);"}}{SEP_R 15 0}{COM_R 16 0{TEXT 1 54 "We
 vary one of the radii of an ellipsoid periodically:"}}{SEP_R 17 
0}{INP_R 18 0 "> "{TEXT 0 184 "animate3d(\012[cos(u)*cos(v), (1+0
.3*sin(5*t))*cos(u)*sin(v), cos(t)*sin(u)],\012u=0..2*Pi, v=0..Pi
, t=0..Pi,\012style=patchnogrid, scaling=constrained, frames=15,\
012title=`Pulsating Ellipsoid`);"}}{SEP_R 19 0}{COM_R 20 0{TEXT 1
 22 "Making planar  waves: "}}{SEP_R 21 0}{INP_R 22 0 "> "{TEXT 0
 91 "animate3d(cos(t*x)*sin(t*y), x=-Pi/2..Pi/2, y=0..2*Pi, t=1..
2,\012color=x, style=patchnogrid);"}}{SEP_R 23 0}{COM_R 24 0{TEXT
 1 121 "Graphs of complex functions can be visualized by rotating
 them between the real part and the imaginary part projections: "
}}{SEP_R 25 0}{INP_R 26 0 "> "{TEXT 0 164 "animate3d(2*sin(t)+cos
(t)*(x^2-y^2)+sin(t)*(2*x*y), x=-1..1, y=-1..1, t=0..Pi/2,\012sty
le=patchnogrid, scaling=constrained,\012title=`Rotating the Compl
ex Square in 4d`);"}}{SEP_R 27 0}{COM_R 28 0{TEXT 1 67 "Flattenin
g out a sphere to a plane by the stereographic projection."}}
{SEP_R 29 0}{INP_R 30 0 "> "{TEXT 0 49 "p1:=cos(v)*cos(u):\012p2:
=cos(v)*sin(u):\012p3:=sin(v):"}}{SEP_R 31 0}{INP_R 32 0 "> "
{TEXT 0 194 "animate3d([(1-t)*p1+t*p1/(1-p3), (1-t)*p2+t*p2/(1-p3
), (1-t)*p3], \012u=0..2*Pi, v=-Pi/2..1, t=0..1,\012scaling=const
rained, style=patch, color=sin(v),\012title=`Animating the Stereo
graphic Projection`);"}}{SEP_R 33 0}{COM_R 34 0{TEXT 1 29 "Degree
 two map of the sphere."}}{SEP_R 35 0}{INP_R 36 0 "> "{TEXT 0 102
 "sq1 := animate3d([cos(v)*cos(t*u), cos(v)*sin(t*u), sin(v)],\01
2u=0..Pi, v=-Pi/2..Pi/2, t=1..2,\012color=u):"}}{SEP_R 37 0}
{INP_R 38 0 "> "{TEXT 0 107 "sq2 := animate3d([3+cos(v)*cos(t*u),
 cos(v)*sin(t*u), sin(v)],\012u=Pi..2*Pi, v=-Pi/2..Pi/2, t=1..2,\
012color=u):"}}{SEP_R 39 0}{INP_R 40 0 "> "{TEXT 0 169 "display([
sq1,sq2],\012insequence=false, style=patchnogrid, scaling=constra
ined, \012orientation=[-34,48],\012titlefont=[TIMES,ROMAN,18], ti
tle=`Degree two map of  the sphere I`);"}}{SEP_R 41 0}{COM_R 42 0
{TEXT 1 41 "We now consider more complex animations. "}}{SEP_R 43
 0}{COM_R 44 0{TEXT 1 61 "The Klein Bottle is traced by a figure \+
eight moving in space."}}{SEP_R 45 0}{INP_R 46 0 "> "{TEXT 0 314 
"animate3d(\012[(2+cos(t*u/2)*sin(v)-sin(t*u/2)*sin(2*v))*cos(t*u
),\012 (2+cos(t*u/2)*sin(v)-sin(t*u/2)*sin(2*v))*sin(t*u),\012 si
n(t*u/2)*sin(v)+cos(t*u/2)*sin(2*v)], u=0..2*Pi, v=0..2*Pi, t=0..
1,\012grid=[30,40], orientation=[-40,53], scaling=constrained, \0
12style=patchnogrid,color=sin(v),\012title=`Animating the Klein B
ottle`);"}}{SEP_R 47 0}{COM_R 48 0{TEXT 1 66 "Half of the Klein B
ottle is traced by a figure S  moving in space."}}{SEP_R 49 0}
{INP_R 50 0 "> "{TEXT 0 325 "animate3d(\012[(2+cos(t*u/2)*sin(v)-
sin(t*u/2)*sin(2*v))*cos(t*u),\012 (2+cos(t*u/2)*sin(v)-sin(t*u/2
)*sin(2*v))*sin(t*u),\012 sin(t*u/2)*sin(v)+cos(t*u/2)*sin(2*v)],
 u=0..2*Pi, v=-Pi/2..Pi/2, t=0..1,\012grid=[30,20],orientation=[-
40,53], scaling=constrained,\012style=patchnogrid, color=sin(v),\
012title=`Animating Half of the Klein Bottle`);"}}{SEP_R 51 0}
{COM_R 52 0{TEXT 1 47 "Mobius strip bent to half of the Klein Bot
tle: "}}{SEP_R 53 0}{INP_R 54 0 "> "{TEXT 0 340 "animate3d(\012[(
2+cos(u/2)*sin(t*v+Pi)-sin(u/2)*sin(2*(t*v+Pi)))*cos(u),\012 (2+c
os(u/2)*sin(t*v+Pi)-sin(u/2)*sin(2*(t*v+Pi)))*sin(u),\012 sin(u/2
)*sin(t*v+Pi)+cos(u/2)*sin(2*(t*v+Pi))], u=0..2*Pi, v=-Pi/2..Pi/2
, t=1/4..1,\012grid=[50,25], scaling=constrained, style=patchnogr
id, color=sin(v/2),\012title=`Mobius strip bent to half of the Kl
ein Bottle `);"}}{SEP_R 55 0}{COM_R 56 0{TEXT 1 48 "Two Mobius st
rips join to form the Klein bottle."}}{SEP_R 57 0}{INP_R 58 0 "> \+
"{TEXT 0 228 "paste1 := animate3d(\012[(2+cos(u/2)*sin(t*v)-sin(u
/2)*sin(2*t*v))*cos(u),\012 (2+cos(u/2)*sin(t*v)-sin(u/2)*sin(2*t
*v))*sin(u),\012 sin(u/2)*sin(t*v)+cos(u/2)*sin(2*t*v)], u=0..2*P
i, v=-Pi/2..Pi/2, t=1/4..1,\012grid=[30,15], color=sin(v)):"}}
{SEP_R 59 0}{INP_R 60 0 "> "{TEXT 0 260 "paste2 := animate3d(\012
[(2+cos(u/2)*sin(t*v+Pi)-sin(u/2)*sin(2*(t*v+Pi)))*cos(u), \012 (
2+cos(u/2)*sin(t*v+Pi)-sin(u/2)*sin(2*(t*v+Pi)))*sin(u),\012 sin(
u/2)*sin(t*v+Pi)+cos(u/2)*sin(2*(t*v+Pi))+5-5*t], \012u=0..2*Pi, \+
v=-Pi/2..Pi/2, t=1/4..1,\012grid=[30,15], color=sin(v)):"}}{SEP_R
 61 0}{INP_R 62 0 "> "{TEXT 0 95 "display3d([paste1,paste2],\012s
tyle=patch, scaling=constrained, shading=Z, orientation=[-104,71]
);"}}{SEP_R 63 0}{COM_R 64 0{TEXT 1 71 "The torus is obtained fro
m a rectangle by side pairing transformations."}}{SEP_R 65 0}
{INP_R 66 0 "> "{TEXT 0 136 "A := animate3d(\012[(1-t)*x+t*exp(x)
*cos(y), (1-t)*y+t*exp(x)*sin(y), 0],\012x=Pi/4..Pi/2, y=0..Pi, t
=0..1,\012color=x, frames=10, grid=[15,40]):"}}{SEP_R 67 0}{INP_R
 68 0 "> "{TEXT 0 55 "R:=(exp(Pi/2)+exp(Pi/4))/2:\012r:=(exp(Pi/2
)-exp(Pi/4))/2:"}}{SEP_R 69 0}{INP_R 70 0 "> "{TEXT 0 255 "B := a
nimate3d(\012[(R+(4*r/Pi)*sin((Pi/(4*r))*t*(exp(x)-R))/t)*cos((1+
t/4)*y),\012(R+(4*r/Pi)*sin((Pi/(4*r))*t*(exp(x)-R))/t)*sin((1+t/
4)*y),\012((4*r)/Pi)*(1-cos((Pi/(4*r))*t*(exp(x)-R)))/t], x=Pi/4.
.Pi/2, y=0..Pi, t=-0.005..4,\012color=x, frames=10, grid=[15,40])
:"}}{SEP_R 71 0}{INP_R 72 0 "> "{TEXT 0 159 "display([A,B],\012in
sequence=true, style=patchnogrid, scaling=constrained,\012orienta
tion=[-24,64],\012title=`The Torus is a Rectangle with Opposite S
ides Identified`);"}}{SEP_R 73 0}{COM_R 74 0{TEXT 1 43 "A less te
chnical approach using procedures:"}}{SEP_R 75 0}{INP_R 76 0 "> "
{TEXT 0 109 "f1 := proc(u,t) if u<t then u else t+sin(u-t) fi; en
d:\012f2 := proc(u,t) if u<t then 0 else 1-cos(u-t) fi; end:"}}
{SEP_R 77 0}{INP_R 78 0 "> "{TEXT 0 100 "animate([f1,f2,0..2*Pi],
0..2*Pi,\012axes=none, color=red, thickness=3, scaling=constraine
d, frames=20);"}}{SEP_R 79 0}{INP_R 80 0 "> "{TEXT 0 139 "g1 := p
roc(u,v,t) if u<t then u else t+sin(u-t) fi; end:\012g2 := proc(u
,v,t) v; end:\012g3 := proc(u,v,t) if u<t then 0 else 1-cos(u-t) \+
fi; end:"}}{SEP_R 81 0}{INP_R 82 0 "> "{TEXT 0 152 "animate3d([g1
,g2,g3],0..2*Pi,0..10,0..2*Pi,\012style=patchnogrid, grid=[40,50]
,shading=zhue,\012titlefont=[TIMES,ROMAN,18], title=`Rolling out \+
the Cylinder`);"}}{SEP_R 83 0}{INP_R 84 0 "> "{TEXT 0 7 "r:=0.5:"
}}{SEP_R 85 0}{INP_R 86 0 "> "{TEXT 0 68 "h1:=proc(u,v,t) if u<t \+
then u else t+sin(u-t)*(1-r*cos(v)) fi; end: "}}{SEP_R 87 0}
{INP_R 88 0 "> "{TEXT 0 74 "h2:=proc(u,v,t) if u<t then r*cos(v) \+
else 1-cos(u-t)*(1-r*cos(v)) fi; end:"}}{SEP_R 89 0}{INP_R 90 0 "
> "{TEXT 0 59 "h3:=proc(u,v,t) if u<t then r*sin(v) else r*sin(v)
 fi: end:"}}{SEP_R 91 0}{INP_R 92 0 "> "{TEXT 0 192 "animate3d([h
1,h2,h3],0..2*Pi,0..10,0..2*Pi,\012style=patchnogrid, grid=[40,50
],shading=zhue, \012orientation=[40,75], scaling=constrained,\012
titlefont=[TIMES,ROMAN,18], title=`Rolling out the Torus`);"}}}
{END}
