Plotting Functions You Created Now that you have learned how to write Maple functions you can effectively plot 3-dimensional graphs (assuming you are in an X-session). The command is plot3d. You specify a set of functions to plot and the ranges of the independent variables. The functions must satisfy the characteristics described in help('plot3d'), but with some thought you can plot almost any kind of surface in 3-space. You can also give plot options to configure various aspects of the final display. Here is a lengthy example of how to plot parametric functions using plot3d. You can enter it interactively or place the commands in a file and read it in. > x1 := proc(tau, theta) > (a + b*sin(tau))*cos(theta); > end: > y1 := proc(tau, theta) > (a + b*sin(tau))*sin(theta); > end: > z1 := proc(tau, theta) > b*cos(tau); > end: > torus1 := [x1,y1,z1]: > x2 := proc(tau, theta) > a + x1(tau, theta); > end: > y2 := proc(tau, theta) > z1(tau, theta); > end: > z2 := proc(tau, theta) > y1(tau, theta); > end: > torus2 := [x2, y2, z2]: > plotranges := 0..2*Pi, 0..2*Pi: > optionseq := scaling=CONSTRAINED, axes=NONE, numpoints=1600: > plotboth := 'plot3d({torus1, torus2}, plotranges, optionseq)': > a := 10: b := 3: > # Now just use "plotboth" to plot the two surfaces > plotboth; Maple will spend a few minutes calculating all the points for plot, then display the result in a separate window. If you find that the window does not display the graph when it opens, just try moving the window or iconizing and opening it again. [An Andrew ToolKit view (a raster image) was included here, but could not be displayed.] To print the graph on a postscript printer, just click on the print button on the plotting window. It will open a pop-up dialog that gives you the default file name (plotoutfile) that it will write a postscript-format file to. Move the mouse pointer into this little window and change the filename if you so desire. Then click on the postscript button; after a few moments, Maple will have finished writing a description of your plot to the file. To print this file to a postscript printer, from the Glue% prompt just use the command: Glue% qpr -q printername-ps filename where printername is the name of a postscript printer near you.