Next: Other Plot Routines Up: Plotting with Maple Previous: Two-Dimensional Plots

## Three-Dimensional Plots

Maple provides several routines for plotting expressions in one, two, or three unknowns in space. Some of these commands are found in the library package plots, and so you must have first typed with(plots):

plot3d
• To plot the graph of a function of two variables over a domain in the plane use:
```        plot3d(f(x,y),x=a..b,y=c..d);
```
Note that numerous variations on `plot3d` can be obtained using the options appearing in the menu bar at the top of the graphics window. Also, three-dimensional graphics images can be rotated within the graphics window: Click on the left mouse button in the graphics window, hold down the left mouse button and move the mouse within the graphics window, thus dragging the box. Release the button and click on the middle mouse button to redraw the plot. For example: `plot3d( x^2-y^2, x=-1..1, y=-1..1 );`

QUESTION 6: Plot and print the graph of . Mark the plot to indicate all of the (a) tops of hills and (b) bottoms of valleys.

As with the `plot` command, it is possible to use `plot3d` to plot the graphs of several functions on the same set of coordinate axes.
```        plot3d({f(x,y),g(x,y),...,h(x,y)},x=a..b,y=c..d);
```
For example: `plot3d( {x^2-y^2, exp(x^2+y^2)}, x=-1..1, y=-1..1 );`

• To plot a surface defined parametrically by , use:
```        plot3d([f(u,v),g(u,v),h(u,v)],u=a..b,v=c..d);
```
For example, figure out the name of the geometric figure computed below:
```        plot3d([cos(u)*(2+cos(v)),sin(u)*(2+cos(v)),sin(v)],u=0..2*Pi,v=0..2*Pi);
```
Multiple 3D parametric plots are also possible. Again, pack the ``square brackets'' into braces:
```plot3d({[s,t,0], [s,t,1]}, s=-1..1, t=-1..1);
```

implicitplot3d
To plot the surface defined implicitly by the equation in space, use
```        implicitplot3d(f(x,y,z) = k, x=a..b,y=c..d,z=e..g);
```
For example, `implicitplot3d(x^2+y^2+z^2=1, x=-1..1,y=-1..1,z=-1..1);`

spacecurve
It is also possible to plot parametric curves that are not restricted to the plane: command.
```        spacecurve([f1(t), f2(t), f3(t)], t=a..b);
```
For example, `spacecurve([cos(t),sin(t),t],t=0..4*Pi);`

In addition, it is possible to animate your plots. For this and other plotting routines and options see the Help Browser.

Next: Other Plot Routines Up: Plotting with Maple Previous: Two-Dimensional Plots

Bob Hesse
Wed Oct 23 21:17:40 CDT 1996