{VERSION 5 0 "APPLE_PPC_MAC" "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 Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 271 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 272 "" 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0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 261 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 16 "Introduction to " } {TEXT 256 5 "Maple" }{TEXT -1 0 "" }}{PARA 257 "" 0 "" {TEXT 292 26 "T hree Dimensional Graphing" }{TEXT -1 1 " " }{TEXT 291 44 "by Bob Brads haw, Ohlone College, Fremont, CA" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 216 "\nThere are two basic types of three dim ensional graphs, curves and surfaces. This sheet will show how to grap h both curves and surfaces and also something called Tubeplot, a inte resting combination of the two types." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 24 "Three Dimensional Curve s" }}{PARA 0 "" 0 "" {TEXT -1 37 "To graph a 3-dimensional curve using " }{TEXT 257 5 "Maple" }{TEXT -1 86 ", you create a set of three para metric equations and then use the command spacecurve([" }{TEXT 258 25 "x, y, z, t = start .. end" }{TEXT -1 2 "])" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 62 "f:=cos(3*t);\ng:=sin(3*t);\nh:=t;\nspacecurve([f,g ,h,t=0..2*Pi]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 219 "\nAs we did w ith graphing in two dimensions, we can alter the appearance of the gra ph clicking on the graph and changing some of the options. Alternative ly, we can change the appearance by placing the options within the " } {TEXT 259 10 "spacecurve" }{TEXT -1 9 " command." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 61 "To start, add the coordin ate axes and make the curve thicker." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "spacecurve([f,g,h,t=0..2*Pi],thickness=5, axes=normal);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 41 "Yo u can draw the curve as a single color." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "spacecurve([f,g,h,t=0..2*Pi],thickness=5,axes=normal,color=blu e);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 9 "By using " }{TEXT 269 14 "shading = zhue" }{TEXT -1 92 ", you ca n indicate the height of the graph as a color, with the hot (red) colo rs at the top." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "spacecurve([f,g,h ,t=0..2*Pi],thickness=5,axes=normal,shading=zhue);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 65 "The graph can be \+ smoothed out by increasing the number of points." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "spacecurve([f,g,h,t=0..2*Pi],thickness=5,axes=normal, \nshading=zhue,numpoints=500);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 42 "The curve can be drawn to scale using the " }{TEXT 270 21 "scaling = constrained" }{TEXT -1 9 " command." } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 "spacecurve([f,g,h,t=0..2*Pi],thick ness=5,axes=normal,shading=zhue,\nscaling = constrained);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 71 "The angle from which you view the object can also be changed using the " } {TEXT 271 28 "orientation = [angle, angle]" }{TEXT -1 9 " command." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 89 "spacecurve([f,g,h,t=0..2*Pi],thickn ess=5,axes=normal,shading=zhue,\norientation=[30,170]);" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 " " }}{PARA 260 "" 0 "" {TEXT -1 9 "Tubeplots" }}{PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 281 8 "tubeplot" }{TEXT -1 62 " command creates a p lot along a curve in space similar to the " }{TEXT 282 11 "spacecurve \+ " }{TEXT -1 59 "command. However, instead of simply drawing the curve, the " }{TEXT 283 8 "tubeplot" }{TEXT -1 161 " command will draw a sur face of a cylinder with the curve as its center. The radius of the cyl inder can be a variable. The structure of the command is\ntubeplot([" }{TEXT 284 10 "x, y, z, t" }{TEXT -1 3 " = " }{TEXT 285 12 "start .. e nd" }{TEXT -1 12 "), radius = " }{TEXT 286 10 "expression" }{TEXT -1 3 ").\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "tubeplot([f,g,h,t=0..2*P i],radius=0.5);" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 62 "Now change the above example so that the radius is a variable." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "tubeplot([f,g,h,t=0.. 2*Pi],radius=0.15*t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "\nThis e xample shows a simple cylinder." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 90 " tubeplot([0,0,t,t=0..4],radius=2,grid=[50,50],color=blue,\nstyle=patch contour,axes=normal);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "\nThis e xample shows a more interesting curve." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "tubeplot([0,0,t,t=0..2*Pi],radius=(t)*sin(2*t),shading=zhue,sh ading=zhue);" }}}{EXCHG {PARA 259 "" 0 "" {TEXT -1 9 "\nSurfaces" }} {PARA 0 "" 0 "" {TEXT -1 138 "Three dimensional surfaces are often in \+ the form of a single equation. There are two commands that will be use d to graph these surfaces - " }{TEXT 272 6 "plot3d" }{TEXT -1 5 " and \+ " }{TEXT 273 15 "implicitplot3d." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 279 0 "" }{TEXT -1 3 "Use" }{TEXT 280 7 " plot3d " }{TEXT -1 39 " when you have an equation of the form " }{TEXT 274 1 "z" }{TEXT -1 3 " = " }{TEXT 275 9 "f(x, y). " }{TEXT -1 33 "The comma nd structure is \nplot3d(" }{TEXT 276 46 "expression, x = start .. end , y = start.. end)" }{TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "plot3d(x^2-y^2,x=-2..2,y=-2..2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 224 "You can plot more than one sur face by creating the plots and giving each plot a name, such as p1 and p2. Be sure to end the commands with colons rather than semicolons. N ext, display the surfaces using the command\ndisplay3d(" }{TEXT 278 15 "name1, name2. \311" }{TEXT -1 3 ") " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 18 "z1:=x^2;\nz2:=y^2;\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "p1:=plot3d(z1,x=-2..2,y=-2..2,color=red):\np2:=plot3d(z2,x=-2.. 2,y=-2..2,color=green):\ndisplay3d(p1,p2);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 43 "A second way to graph sur faces is with the " }{TEXT 288 14 "implicitplot3d" }{TEXT -1 70 " comm and. This command does not require you to solve the equation for " } {TEXT 289 1 "z" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 121 "implicitplot3d(x^2+y^2+z^2= 1,x=-1..1,y=-1..1,z=-1..1,scaling=constrained, axes=normal,shading=zhu e,style=patchcontour);\n\n" }{TEXT -1 73 "You can find more informatio n on this command by typing \"?implicitplot3d\"" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 261 "" 0 "" {TEXT -1 11 "You \+ Try It!" }}{PARA 0 "" 0 "" {TEXT -1 50 "1. Produce a graph of the thre e dimensional curve " }{TEXT 260 1 "x" }{TEXT -1 3 " = " }{TEXT 261 1 "t" }{TEXT -1 4 "cos(" }{TEXT 262 2 "4t" }{TEXT -1 3 "), " }{TEXT 263 1 "y" }{TEXT -1 3 " = " }{TEXT 264 1 "t" }{TEXT -1 6 " sin(4" }{TEXT 265 1 "t" }{TEXT -1 3 "), " }{TEXT 266 1 "z" }{TEXT -1 7 " = cos(" } {TEXT 267 1 "t" }{TEXT -1 9 ") on 0 \262 " }{TEXT 268 1 "t" }{TEXT -1 41 " \262 18\271. Set the number of points = 1000.\n" }}{PARA 0 "" 0 " " {TEXT -1 144 "2. The command tubeplot([0, 0, t, t=0..4], radius = 2 , grid=[50,50], axes = normal, color=blue, style=patchcontour) gave a \+ cylinder around the " }{TEXT 290 1 "z" }{TEXT -1 60 " axis. Produce a \+ simlar tubeplot that is centered along the " }{TEXT 277 1 "x" }{TEXT -1 39 " axis. Use a different color than blue." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 11 "3. Use the " }{TEXT 287 9 "display3d" }{TEXT -1 68 " command to show both the tubes in part (2 ) above on the same graph." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 51 "4. Create a graph of the three dimensional surfac es" }}{PARA 0 "" 0 "" {TEXT -1 1 " " }{XPPEDIT 18 0 "z = exp(-.1*(x^2+ y^2))*cos(x^2+y^2);" "6#/%\"zG*&-%$expG6#,$*&-%&FloatG6$\"\"\"!\"\"F., &*$%\"xG\"\"#F.*$%\"yGF3F.F.F/F.-%$cosG6#,&*$F2F3F.*$F5F3F.F." }} {PARA 0 "" 0 "" {XPPEDIT 18 0 "x^2-y^2/4+z^2-z = 4;" "6#/,**$%\"xG\"\" #\"\"\"*&%\"yGF'\"\"%!\"\"F,*$%\"zGF'F(F.F,F+" }}}}{MARK "0 1 2" 12 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }