Next: Exercises Previous: Visualizing 3d Surfaces

# Level Curves and Contour Plots

Before the advent of computer graphics it was difficult to plot 3d surfaces. Probably the most popular classic way of visualizing peaks and valleys is as it is done on topographic maps using contours. Topomaps allow experienced users to reconstruct fine details of the 3d surface of a certain geographic area from the map printed on a piece of flat, two-dimensional paper.

Level curves, or contours, are the curves corresponding to the equation f(x,y)=h for various fixed values of the elevation z=h. For example on a topopmap they might be traced for every etc.). Often a thicker line is used for every . Imagine that the 3d surface is sliced with horizontal planes every and then the lines where the surface and the plane intersect are projected down into the x-y plane.

Important:

Level curves are in the x-y plane. One level curve consists e.g. of all (x,y) points which satisfy f(x,y)=100. If , then this level curve will be the circle . Another level curve will be the circle , etc. A contourplot is a 2d representation of a 3d surface, just like a flat (i.e., 2d) map is a representation of the 3d mountains.

If your assignment you will associate 3d surfaces with their topomaps. You can use the following example as a prototype.

```  > TwinPeaks:=(x,y,z)->(3/4)*(y^2)+(1/24)*(y^3)-(1/32)*(y^4)-x^2-z;

> implicitplot3d(TwinPeaks(x,y,z),x=-4..4,y=-5..6,z=-3..7,
style=patchcontour,orientation=[30,80],grid=[20,20,20]);
```

Leaving out the ``grid" option will accelerate the plotting procedure but will result in a much coarser graph. The topomap of the Twin Peaks is shown below. Try to get this from the 3d plot.

D. Vermes
Tue Feb 11 22:17:27 EST 1997