{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 "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 
0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 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 "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 "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 
0 0 0 0 0 1 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 11 12 1 
{CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }1 0 0 -1 -1 -1 0 
0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helveti
ca" 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 14 0 0 0 0 
2 2 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 Font 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 -1 64 "MAPLE WORKSHEET #6:  3d Plots, \+
Spacecurves and Parametric Plots." }}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 
39 "Load the plots and plottools  packages:" }}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 29 "with(plots): with(plottools):" }}{PARA 7 "" 1 "" 
{TEXT -1 43 "Warning, the name arrow has been redefined\n" }}}}{SECT 
1 {PARA 3 "" 0 "" {TEXT -1 105 "Ordinary 3d plots of functions with  o
ptions. The color specifications are given by hue, RGB and by zhue:" }
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 191 "plot3d(\nx^2-y^2, x=-2..2,
 y=-2..2,\ngrid=[40,40], scaling=constrained, style=patchnogrid, orien
tation=[66,32],\ncolor=x^2+y^2,\norientation=[66,32],\ntitlefont=[TIME
S,ROMAN,18],title=`Saddle I`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 
1 0 196 "plot3d(\nx^2-y^2, x=-2..2, y=-2..2,\ngrid=[60,60], scaling=co
nstrained, style=patchnogrid,\ncolor=[ sin(x*y), cos(x*y), tan(x*y) ],
\norientation=[90,0],\ntitlefont=[TIMES,ROMAN,18], title=`Saddle II`);
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 169 "plot3d(\nx^2-y^2,x=-2.
.2,y=-2..2,\ngrid=[40,40], scaling=constrained, style=patchnogrid, sha
ding=zhue,\norientation=[66,32],\ntitlefont=[TIMES,ROMAN,18],title=`Sa
ddle III`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 165 "plot3d(\ny^
2-x^3+3*x-2, x=-2..2, y=-2..2,\ngrid=[50,50], style=patchcontour, shad
ing=zhue,\norientation=[-109,22],\ntitlefont=[TIMES,ROMAN,18], title=`
Elliptic Curves`);" }}}{SECT 0 {PARA 0 "" 0 "" {TEXT -1 152 "Another w
ay to create the last figure is to use contourplot. Notice that we def
ined z as a function and we do not need to display the x and y variabl
es." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 144 "z:=(x,y)->y^2-x^3+3*
x-2:\ncontourplot(\nz, -2..2, -2..2,\ngrid=[30,30], contours=[-1,-1/2,
-1/4,0,1/4,1/2,1], filled=false, thickness=1, axes=none);" }}}}{SECT 
0 {PARA 0 "" 0 "" {TEXT -1 92 "Here is an example of the real part of \+
the complex function colored by \nthe imaginary part: " }}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "plot3d(\nexp(x)*cos(y), x=-1..2, y=
0..4*Pi,\ngrid=[30,50], style=patchnogrid,\ncolor=exp(x)*sin(y) );" }}
}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "Spacecurves:" }}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 6 "s:=\{\}:" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 93 "for n from 1 by 1 to 4 do \ns:=s union \{ \n[cos(t), \+
cos(n*Pi/12)*sin(t), sin(n*Pi/12)*sin(t)]\n\}" }}{PARA 0 "> " 0 "" 
{MPLTEXT 1 0 3 "od:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "f:= \+
transform((x,y,z) -> [x/(1-z),y/(1-z),0]):" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 38 "a:=spacecurve(s, t=0..2*Pi,color=red):" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "display3d(a, \nscaling=constrained,
 thickness=2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "b:=f(spac
ecurve(s, t=0..2*Pi, \ncolor=blue, numpoints=100)):" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 51 "display3d(\{a,b\},\nscaling=constrained, \+
thickness=2);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 32 "Combining plot
s and spacecurves:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "f:=(x,
y)->cos(x^2+y^2);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGf*6$%\"xG%
\"yG6\"6$%)operatorG%&arrowGF)-%$cosG6#,&*$)9$\"\"#\"\"\"F5*$)9%F4F5F5
F)F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "graph := plot3d(
\nf-0.05, -Pi^2/8..Pi^2/8, -Pi^2/8..Pi^2/8,\ngrid=[50,50],style=patchn
ogrid,axes=none,shading=zhue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 
1 0 12 "x0:=Pi^2/22:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "y0:
=Pi^2/22:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "z0:=f(x0,y0);
" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#z0G-%$cosG6#,$*&\"$U#!\"\"%#PiG
\"\"%\"\"\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "a:=D[1](f);
" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"aGf*6$%\"xG%\"yG6\"6$%)operato
rG%&arrowGF),$*(\"\"#\"\"\"-%$sinG6#,&*$)9$F/F0F0*$)9%F/F0F0F0F7F0!\"
\"F)F)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "b:=D[2](f);" }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"bGf*6$%\"xG%\"yG6\"6$%)operatorG%&
arrowGF),$*(\"\"#\"\"\"-%$sinG6#,&*$)9$F/F0F0*$)9%F/F0F0F0F:F0!\"\"F)F
)F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "s:=a(x0,y0);" }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"sG,$*&#\"\"\"\"#6F(*&-%$sinG6#,$*&
\"$U#!\"\"%#PiG\"\"%F(F()F2\"\"#F(F(F1" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 12 "t:=b(x0,y0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"t
G,$*&#\"\"\"\"#6F(*&-%$sinG6#,$*&\"$U#!\"\"%#PiG\"\"%F(F()F2\"\"#F(F(F
1" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "tangentplane:=plot3d(
\ns*(x-x0)+t*(y-y0)+z0,x=-Pi^2/8..Pi^2/8,y=-Pi^2/8..Pi^2/8,\ngrid=[30,
30],style=wireframe,axes=none):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 
1 0 75 "xcurve:=spacecurve([x,y0,f(x,y0),x=-Pi^2/8..Pi^2/8],color=red,
thickness=4):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 76 "ycurve:=sp
acecurve([x0,y,f(x0,y),y=-Pi^2/8..Pi^2/8],color=blue,thickness=4):" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "xline:=spacecurve([x,y0,z0+
s*(x-x0),x=-Pi^2/8..Pi^2/8],color=red,thickness=4):" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 79 "yline:=spacecurve([x0,y,z0+t*(y-y0),y=-Pi
^2/8..Pi^2/8],color=blue,thickness=4):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 175 "display(\{ graph, tangentplane, xcurve, ycurve, xlin
e, yline \},\nscaling=constrained, orientation=[122,43], shading=XY,\n
titlefont=[TIMES,ROMAN,18], title=`Partial Derivatives`);" }}}}{SECT 
1 {PARA 3 "" 0 "" {TEXT -1 17 "Parametric plots:" }}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 228 "plot3d(\n[ cos(u)*cos(v), sin(u)*cos(v), sin(
v) ], u=0..2*Pi, v=-Pi/4..Pi/4,\ngrid=[40,30], style=patchnogrid, orie
ntation=[45,38], scaling=constrained,\nshading=zhue, color=u,\ntitlefo
nt=[TIMES,ROMAN,18], title=`Spherical Belt I`);" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 229 "plot3d(\n[ cos(u)*cos(v), sin(u)*cos(v), sin(
v) ], u=0..2*Pi, v=-Pi/4..Pi/4,\ngrid=[40,30], style=patchnogrid, orie
ntation=[45,38], scaling=constrained,\nshading=zhue, color=v,\ntitlefo
nt=[TIMES,ROMAN,18], title=`Spherical Belt II`);" }}}{EXCHG {PARA 0 ">
 " 0 "" {MPLTEXT 1 0 279 "display3d(\{\nseq(\nplot3d( [ cos(u)*cos(v),
 sin(u)*cos(v), sin(v) ],\nu=2*k*Pi/10..(2*k+1)*Pi/10, v=-Pi/2..Pi/2,
\ngrid=[10,30], style=patchnogrid, color=u),\nk=0..9)\},\norientation=
[46,47], scaling=constrained, shading=zhue,\ntitlefont=[TIMES,ROMAN,18
], title=`Meridians of Longitude`);" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 275 "display3d(\{\nseq(\nplot3d( [ cos(u)*cos(v), sin(u)*
cos(v), sin(v) ],\nu=0..2*Pi, v=2*k*Pi/20..(2*k+1)*Pi/20,\ngrid=[40,10
], style=patchnogrid, color=u),\nk=-5..4)\},\norientation=[46,47], sca
ling=constrained, shading=zhue,\ntitlefont=[TIMES,ROMAN,18], title=`Pa
rallels of Latitude`);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 5 "Tori:
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 178 "tor:=(R,r,c1,c2,c3,a,b,
c,d)->plot3d(\n[ cos(u)*(R+r*cos(v)), sin(u)*(R+r*cos(v)), r*sin(v) ],
 u=a..b, v=c..d,\nstyle=patch, shading=zhue, grid=[60,30], color=COLOR
(RGB,c1,c2,c3) ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 203 "displ
ay(\{\ntor(3,1.5,1,0,1,0,2*Pi,Pi/2,3*Pi/2),\ntor(3,1,1,1,0,0,Pi,0,2*Pi
),\ntor(3,0.5,0,1,1,0,2*Pi,0,2*Pi) \},\nscaling=constrained, orientati
on=[-87,73],\ntitlefont=[TIMES,ROMAN,18], title=`Clifford Tori`);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 180 "plot3d([u*cos(v),u*sin(v),v/2], u=0..3, v=-
Pi..4*Pi,\nscaling=constrained,grid=[10,100],style=patch,orientation=[
9,46],color=u,\ntitlefont=[TIMES,ROMAN,18],title=`Spiral Staircase`);
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 228 "plot3d(\n[ 5*cos(u)*(2
+v*cos(u/2)), 5*sin(u)*(2+v*cos(u/2)), 5*v*sin(u/2) ],\nu=0..2*Pi,v=-1
..1,\ngrid=[50,20], style=patchnogrid, color=u,\nscaling=constrained, \+
orientation=[39,63],\ntitlefont=[TIMES,ROMAN,18], title=`Mobius Band`)
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 185 "plot3d(\n[ r*cos(thet
a), r*sin(theta), r^(1/2)*cos(theta/2) ], r=0..0.5, theta=0..4*Pi,\ngr
id=[10,100], style=patch, color=theta,\ntitlefont=[TIMES,ROMAN,18], ti
tle=`Complex Square Root`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 
203 "plot3d(\n[ r*cos(theta), r*sin(theta), r^(1/3)*cos(theta/3) ], r=
0..0.4, theta=0..6*Pi,\ngrid=[10,140], style=patch, orientation=[46,62
], color=1-r,\ntitlefont=[TIMES,ROMAN,18], title=`Complex Cubic Root`)
;" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 45 "We now create two models o
f the Klein Bottle:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 132 "plot
([sin(theta),sin(2*theta),theta=0..2*Pi],\nscaling=constrained, thickn
ess=2,\ntitlefont=[TIMES,ROMAN,18], title=`The Lemniscate`);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "kb1 := (2+cos(r/2)*sin(theta
)-sin(r/2)*sin(2*theta))*cos(r):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 60 "kb2 := (2+cos(r/2)*sin(theta)-sin(r/2)*sin(2*theta))*
sin(r):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "kb3 := sin(r/2)*
sin(theta)+cos(r/2)*sin(2*theta):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 160 "plot3d(\n[kb1, kb2, kb3], r=0..2*Pi, theta=0..2*Pi,
\ngrid=[40,40], color=r, style=patch, scaling=constrained,\ntitlefont=
[TIMES,ROMAN,18], title=`Klein Bottle I`);" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 
28 "with(plots):with(plottools):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warni
ng, the name changecoords has been redefined\n" }}{PARA 7 "" 1 "" 
{TEXT -1 43 "Warning, the name arrow has been redefined\n" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 113 "pl1:=plot3d(\n[ 2*sin(t), 2*cos(t)
, u ], t=Pi/2..5*Pi/2, u=-4..0,\ngrid=[25,10], style=patch, scaling=co
nstrained):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 168 "pl2 := plot
3d(\n[ (4+2*cos(Pi*u/14 +4*Pi/14))*sin(t), (4+2*cos(Pi*u/14 +4*Pi/14))
*cos(t), u ],\nt=Pi/2..5*Pi/2, u=-4..10,\ngrid=[25,30], style=patch, s
caling=constrained):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 144 "pl
3 := plot3d(\n[ cos(t)*(5+2*cos(u))+5, 2*sin(u), sin(t)*(5+2*cos(u)) ]
, t=Pi/2..Pi,u=Pi..3*Pi,\ngrid=[18,25], style=patch, scaling=constrain
ed):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 149 "pl4 := plot3d(\n[ \+
cos(t)*(5+2*cos(u))+5, 2*sin(u), sin(t)*(5+2*cos(u))+10 ],\nt=-Pi/2..P
i, u=Pi..3*Pi,\ngrid=[50,25], style=patch, scaling=constrained):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 144 "pl5 := plot3d(\n[ cos(t)*(4
+2*cos(u)), sin(t)*(4+2*cos(u)), 2*sin(u)-4], t=Pi..3*Pi, u=Pi..2*Pi,
\ngrid=[25,20], style=patch, scaling=constrained):" }}}{EXCHG {PARA 0 
"> " 0 "" {MPLTEXT 1 0 128 "display3d(\n\{ pl1,pl2,pl3,pl4,pl5 \},\nor
ientation=[-87,-128],style=wireframe,\ntitlefont=[TIMES,ROMAN,18],titl
e=`Klein Bottle II`);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 46 "Combin
ing 3d parametric plots and spacecurves:" }}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 122 "st1 := plot3d(\n[ cos(v)*cos(u), cos(v)*sin(u), sin(
v) ], u=0..2*Pi, v=-Pi..Pi,\ngrid=[15,30], style=wireframe, color=blue
):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "st2 := plot3d(\n[ v*
cos(u), v*sin(u), 0], u=0..2*Pi, v=0..4,\ngrid=[30,15], style=wirefram
e, color=cyan):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 91 "st3 := s
pacecurve(\n[0, (1-t)/sqrt(2), t+(1-t)/sqrt(2)], t=0..1,\nthickness=5,
 color=yellow):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "st4 := s
pacecurve(\n[0, t/sqrt(2)+(1-t)/(sqrt(2)-1), t/sqrt(2)],t=0..1,\nthick
ness=5, color=red):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "dis
play3d(\n\{ st1, st2, st3, st4 \},\nscaling=constrained, orientation=[
34,70], \ntitlefont=[TIMES,ROMAN,18],title=`Stereographic Projection`)
;" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 10 "Tubeplots:" }}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 221 "F := (x,y) ->sin(x):\ntubeplot(\{
\n[cos(t), sin(t), 0], [0, sin(t)-1, cos(t)]\}, t=0..2*Pi,\nradius=1/4
,\nnumpoints=50, tubepoints=30,\ncolor=F, style=patch, orientation=[26
,76],\ntitlefont=[TIMES,ROMAN,18], title=`Linked Tori`);" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "k := 3.0^(1/2): N := 15:" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 439 "tubeplot(\{\n[ 1+k*cos(t), \+
k*sin(t), 0.3*sin(3*t), t=0..2*Pi,\nradius=.3, numpoints=trunc(6.4*N),
 tubepoints=N ],\n[ -1/2+k*cos(t), k/2+k*sin(t), 0.3*sin(3*t), t=0..2*
Pi,\nradius=.3, numpoints=trunc(6.4*N), tubepoints=N ],\n[ -1/2+k*cos(
t), -k/2+k*sin(t), 0.3*sin(3*t), t=0..2*Pi,\nradius=.3, numpoints=trun
c(6.4*N), tubepoints=N] \},\nscaling=constrained, orientation=[63,37],
 color=[1,.2,.6],\ntitlefont=[TIMES,ROMAN,18], title=`Borromian Rings`
);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 184 "tubeplot(\n[ -10*cos
(t)-2*cos(5*t)+15*sin(2*t), \n-15*cos(2*t)+10*sin(t)-2*sin(5*t), \n10*
cos(3*t) ],\nt= 0..2*Pi,\nnumpoints=100, tubepoints=20,\nradius=3, sty
le=patchnogrid, shading=zhue);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 
224 "Links and knots. Recall the three golden rectangles that were use
d  to create the icosahedron. We inscribe in each golden rectangle an \+
ellipse.\nAround each ellipse we draw a tube using tubeplot and obtain
 three linked tori. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "resta
rt;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "with(plots):with(plo
ttools):" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoord
s has been redefined\n" }}{PARA 7 "" 1 "" {TEXT -1 43 "Warning, the na
me arrow has been redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 17 "g:=(1+sqrt(5))/2:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 108 
"goldrec1 := polygonplot3d(\n[ [0,g,1], [0,-g,1], [0,-g,-1], [0,g,-1] \+
],\nstyle=line, color=gold, thickness=5):" }}}{EXCHG {PARA 0 "> " 0 "
" {MPLTEXT 1 0 106 "goldrec2 := polygonplot3d(\n[ [g,1,0], [-g,1,0], [
-g,-1,0], [g,-1,0] ],\nstyle=line,color=gold,thickness=5):" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 109 "goldrec3 := polygonplot3d(\n[ [1,0
,g], [-1,0,g], [-1,0,-g], [1,0,-g] ],\nstyle=line, color=gold,  thickn
ess=5):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "display3d(\n\{ g
oldrec1, goldrec2, goldrec3\},\nscaling=constrained, orientation=[49,6
0]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 77 "ell1 := spacecurve(
[g*cos(t), sin(t), 0], t=0..2*Pi,\nthickness=3, color=red):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "ell2 := spacecurve([0, g*cos
(t), sin(t)], t=0..2*Pi,\nthickness=3, color=aquamarine):" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 78 "ell3 := spacecurve([cos(t), 0, g*si
n(t)], t=0..2*Pi,\nthickness=3, color=blue):" }}}{EXCHG {PARA 0 "> " 
0 "" {MPLTEXT 1 0 105 "display3d(\n\{ goldrec1, goldrec2, goldrec3, el
l1, ell2, ell3 \},\nscaling=constrained, orientation=[49,60]);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 75 "display3d(\n\{ ell1, ell2, e
ll3 \},\nscaling=constrained, orientation=[49,60]);" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 111 "tubell1 := tubeplot(\n[g*cos(t), sin(t),
 0], t=0..2*Pi,\nradius=0.2, style=patchnogrid, tubepoints=16,color=re
d):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 116 "tubell2 := tubeplot
(\n[0, g*cos(t), sin(t)], t=0..2*Pi,\nradius=0.2,style=patchnogrid,tub
epoints=16,color=aquamarine):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 112 "tubell3 := tubeplot(\n[cos(t), 0, g*sin(t)], t=0..2*Pi,\nradius
=0.2, style=patchnogrid, tubepoints=16,color=blue):" }}}{EXCHG {PARA 
0 "> " 0 "" {MPLTEXT 1 0 162 "display3d(\n\{ tubell1, tubell2, tubell3
 \},\nscaling=constrained,orientation=[49,60],\nlightmodel = `light2`,
\ntitlefont=[TIMES,ROMAN,18],title=`Three Linked Tori I`);" }}}}{SECT 
1 {PARA 3 "" 0 "" {TEXT -1 26 "We draw curves on a torus." }}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 131 "torus := plot3d(\n[cos(u)*(3+cos(v
)), sin(u)*(3+cos(v)), sin(v)], u=0..2*Pi, v=0..2*Pi,\nstyle=patchnogr
id, grid=[50,80], shading=Z):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 133 "wiretorus := plot3d(\n[cos(u)*(3+cos(v)), sin(u)*(3+cos(v)), si
n(v)], u=0..2*Pi, v=0..2*Pi,\nstyle=wireframe, grid=[50,80], shading=Z
):" }}}{PARA 0 "" 0 "" {TEXT -1 34 "The curves will be raised by 0.05.
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "s:=1.05:" }}}{EXCHG 
{PARA 0 "> " 0 "" {MPLTEXT 1 0 125 "win1 := spacecurve(\n[cos(t)*(3+s*
cos(t)), sin(t)*(3+s*cos(t)), s*sin(t)], t=0..2*Pi,\nnumpoints=500, th
ickness=3, color=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "
display3d(\{ torus, win1 \}, scaling=constrained, orientation=[25,66])
;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "win2 := spacecurve(\n
[cos(t-2*Pi/3)*(3+s*cos(t)), sin(t-2*Pi/3)*(3+s*cos(t)), s*sin(t)], t=
0..2*Pi,\nnumpoints=500, thickness=3, color=blue):" }}}{EXCHG {PARA 0 
"> " 0 "" {MPLTEXT 1 0 139 "win3 := spacecurve(\n[cos(t-4*Pi/3)*(3+s*c
os(t)), sin(t-4*Pi/3)*(3+s*cos(t)), s*sin(t)], t=0..2*Pi,\nnumpoints=5
00, thickness=3, color=blue):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 107 "display3d(\n\{ torus, win1, win2, win3 \}, \nlightmodel = `ligh
t1`, scaling=constrained, orientation=[113,46]);" }}}}{SECT 1 {PARA 3 
"" 0 "" {TEXT -1 49 "For transparency we use wireframe with fine grid.
" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "display3d(\n\{ wiretorus
, win1, win2, win3 \},\nscaling=constrained,orientation=[63,57]);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 125 "tub1 := tubeplot(\n[cos(t)*
(3+s*cos(t)), sin(t)*(3+s*cos(t)), s*sin(t)], t=0..2*Pi,\nradius=0.3, \+
style=patchnogrid, color=red):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 
1 0 145 "tub2 := tubeplot(\n[cos(t-2*Pi/3)*(3+s*cos(t)), sin(t-2*Pi/3)
*(3+s*cos(t)), s*sin(t),t=0..2*Pi],\nradius=0.3, style=patchnogrid, co
lor=aquamarine):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 139 "tub3 :
= tubeplot(\n[cos(t-4*Pi/3)*(3+s*cos(t)), sin(t-4*Pi/3)*(3+s*cos(t)), \+
s*sin(t),t=0..2*Pi],\nradius=0.3, style=patchnogrid, color=blue):" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 168 "display3d(\n\{ tub1, tub2, \+
tub3 \},\nlightmodel = `light1`, scaling=constrained, orientation=[113
,46], shading=Z,\ntitlefont=[TIMES,ROMAN,18], title=`Three Linked Tori
 II`);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 28 "We now consider torus
 knots." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 150 "win:=(R,r,w1,w2)
->spacecurve(\n[cos(w2*t)*(R+r*cos(w1*t)), sin(w2*t)*(R+r*cos(w1*t)), \+
r*sin(w1*t)], t=0..2*Pi,\nnumpoints=500, thickness=3, color=navy):" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 229 "tub:=(R,r,w1,w2)->tubeplot
(\n[cos(w2*t)*(R+r*cos(w1*t)), sin(w2*t)*(R+r*cos(w1*t)), r*sin(w1*t)]
, \nt=0..2*Pi, radius=r/2, \nstyle=patchnogrid, numpoints=40*w1, tubep
oints=8*w2,\nscaling=constrained, orientation=[127,64], shading=Z):" }
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "display3d(\n\{ wiretorus, \+
win(3,1,3,2) \},\nscaling=constrained,orientation=[127,64]);" }}}
{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "display3d(tub(3,1,3,2), titl
efont=[TIMES,ROMAN,18], title=`Torus Knot I`);" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 75 "display3d(tub(3,1,5,2), titlefont=[TIMES,ROMAN
,18], title=`Torus Knot II`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 77 "display3d(tub(3,1,10,1), titlefont=[TIMES,ROMAN,18], title=`Toru
s Knot III`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 158 "smalltoru
s := tubeplot(\n[cos(t)*(3+(1/5)*cos(t)), sin(t)*(3+(1/5)*cos(t)), (1/
5)*sin(t)], t=0..2*Pi,\nradius=1/2, style=patchnogrid, grid=[50,20], c
olor=cyan):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 143 "display3d(
\{tub(3,1,10,1),smalltorus\},\nscaling=constrained, orientation=[127,5
2], shading=Z,\ntitlefont=[TIMES,ROMAN,18], title=`Torus Knot IV`);" }
}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "spacecurve([t*cos(t),t*sin
(t),0.2*t],t=0..6*Pi,\nnumpoints=100,color=navy);" }}}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 97 "tubeplot([t*cos(t),t*sin(t),0.1*t],t=0..6*Pi
,radius=0.7*exp(0.2*t),\ntubepoints=40,numpoints=100);" }}}}{SECT 1 
{PARA 3 "" 0 "" {TEXT -1 21 "Programming in Maple:" }}{EXCHG {PARA 0 "
> " 0 "" {MPLTEXT 1 0 28 "with(plots):with(plottools):" }}{PARA 7 "" 
1 "" {TEXT -1 43 "Warning, the name arrow has been redefined\n" }}
{PARA 7 "" 1 "" {TEXT -1 55 "Warning, the names arrow and torus have b
een redefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 187 "torus:=
proc(R,r,c1,c2,c3,a,b,c,d) \nplot3d([ cos(u)*(R+r*cos(v)), sin(u)*(R+r
*cos(v)), r*sin(v) ],\nu=a..b, v=c..d,\nstyle=patch,shading=zhue, grid
=[60,30], color=COLOR(RGB,c1,c2,c3) ); end:" }}}{EXCHG {PARA 0 "> " 0 
"" {MPLTEXT 1 0 46 "torus(3, 1.5, 0, 1, 1, 0, 2*Pi, Pi/2, 3*Pi/2);" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "print(torus);" }}{PARA 12 "
" 1 "" {XPPMATH 20 "6#f*6+%\"RG%\"rG%#c1G%#c2G%#c3G%\"aG%\"bG%\"cG%\"d
G6\"F.F.-%'plot3dG6)7%*&-%$cosG6#%\"uG\"\"\",&9$F8*&9%F8-F56#%\"vGF8F8
F8*&-%$sinGF6F8F9F8*&F<F8-FBF>F8/F7;9)9*/F?;9+9,/%&styleG%&patchG/%(sh
adingG%%zhueG/%%gridG7$\"#g\"#I/%&colorG-%&COLORG6&%$RGBG9&9'9(F.F.F.
" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 181 "Chebyshev:=proc( n ) \+
\nlocal p, k;  \np[0] := 1; p[1] := x;\nif n<=1 then RETURN(eval(p)) f
i;\nfor k from 2 to n do\np[k] := expand( 2*x*p[k-1]-p[k-2] )\nod;\nRE
TURN(eval(p))\nend:         " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 
0 13 "Chebyshev(5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%&TABLEG6#7(/
\"\"!\"\"\"/F)%\"xG/\"\"#,&*&F-F))F+F-F)F)F)!\"\"/\"\"$,&*&\"\"%F))F+F
3F)F)*&F3F)F+F)F1/F6,(*&\"\")F))F+F6F)F)*&F<F)F0F)F1F)F)/\"\"&,(*&\"#;
F))F+F@F)F)*&\"#?F)F7F)F1*&F@F)F+F)F)" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 16 "a:=Chebyshev(5):" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 66 "plot(\{ seq(a[i],i=0..5) \}, x=-1..1, thickness=3, ti
ckmarks=[0,0]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 283 "curves \+
:= proc(n)\nlocal s, k;\ns[0]:=\{\};\nif n<=0 then RETURN(eval(s) ) fi
;\nfor k from 1  to n do \ns[k]:=s[k-1] union \{ \n[cos(t), cos(k*Pi/1
2)*sin(t), sin(k*Pi/12)*sin(t)],\n[ cos(t)/(1-sin(t)*sin(k*Pi/12)), (c
os(k*Pi/12)*sin(t))/(1-sin(t)*sin(k*Pi/12)), 0] \n\};\nod;\nRETURN(eva
l(s))\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 272 "curves := p
roc(n)\nlocal s, k;\ns:=\{\};\nif n<=0 then RETURN(eval(s) ) fi;\nfor \+
k from 1  to n do \ns:=s union \{ \n[cos(t), cos(k*Pi/12)*sin(t), sin(
k*Pi/12)*sin(t)],\n[ cos(t)/(1-sin(t)*sin(k*Pi/12)), (cos(k*Pi/12)*sin
(t))/(1-sin(t)*sin(k*Pi/12)), 0] \n\};\nod;\nRETURN(eval(s))\nend:" }}
}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 127 "display3d(\nspacecurve(cur
ves(5), t=0..2*Pi, thickness=2, color=blue, numpoints=200), \nscaling=
constrained, orientation=[1,70]);" }}}{EXCHG {PARA 0 "> " 0 "" 
{MPLTEXT 1 0 44 "f := proc(x) if x<0 then -1 else 1 fi; end; " }}
{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"fGf*6#%\"xG6\"F(F(@%29$\"\"!!\"\"
\"\"\"F(F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "plot(f,-1..
1, \nthickness=2, color=red, tickmarks=[0,0]);" }}}{EXCHG {PARA 0 "> \+
" 0 "" {MPLTEXT 1 0 139 "g1 := proc(u,v,t) if u<t then u else t+sin(u-
t) fi; end:\ng2 := proc(u,v,t) v; end:\ng3 := proc(u,v,t) if u<t then \+
0 else 1-cos(u-t) fi; end:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 
152 "animate3d([g1,g2,g3],0..2*Pi,0..10,0..2*Pi,\nstyle=patchnogrid, g
rid=[40,50],shading=zhue,\ntitlefont=[TIMES,ROMAN,18], title=`Rolling \+
out the Cylinder`);" }}}}}{MARK "14" 0 }{VIEWOPTS 1 1 0 3 2 1804 1 1 
1 1 }{PAGENUMBERS 0 1 2 33 1 1 }
