Re: Contour curves & sections onto a surface

• To: mathgroup at smc.vnet.net
• Subject: [mg22189] Re: [mg22136] Contour curves & sections onto a surface
• From: "David Park" <djmp at earthlink.net>
• Date: Thu, 17 Feb 2000 01:24:25 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Murray,

There are probably various implementations of this. I have one implementation in my
DrawingCube package available at my web site. The package allows you to draw the
surface and then add contour lines to it. Here are the usage messages for
DrawContourLines and its option.

DrawContourLines::usage =
"DrawContourLines[f[x, y], {x, xmin, xmax}, {y, ymin, ymax}, opts] will \
extract the 2D contours from a ContourPlot and raise them to primitive \
Graphics3D objects. f[x, y] must be a defined function, not just an \
expression. In plotting contours on a surface, it is useful to lower the \
surface slightly so it will not intersect the contours. Alternatively, the \
option DrawContourOffset can be used to specify an offset for the contour \
lines.";

DrawContourOffset::usage = "DrawContourOffset is an option for \
DrawContourLines which specifies an offset, in the normal plot coordinates, \
for rendering the contour lines. Generally, the contours should be slightly \
raised so they won't intersect the surface polygons. The default value is \
{0,0,0}."

The tutorial has an example of a 3D plot with contour lines.

The package also makes it easy to piece together various surfaces into one plot.

David Park

>Want to plot a surface, graph of f[x, y], and then, on the surface,
>draw:
>
>  (1) at the actual z-height, the contour curve for that height; and/or
>
>  (2) at the actual value x = x0, draw on the curve the section
>("slice") of the curve f[x0, y] (and similarly for fixing y = y0).
>
>I know how to do all that, I think.  But I want the result to look just
>right.  To do that, the curves have to be a different color, or possibly
>thicker, but -- most important -- be displaced a bit from the actual
>surface so as to be distinctly visible.
>
>Somewhere -- in this newsgroup, on the Wolfram web site, in a
>Mathematica book, or in one of journals (Mathematica in Research and
>Education, The Mathematica Journal) -- I once saw a very cleanly done
>implementation that produces very nice results.
>
>Can anyone supply a pointer to that?
>
>--
>Murray Eisenberg                     murray at math.umass.edu
>Mathematics & Statistics Dept.       phone 413 549-1020 (H)
>Univ. of Massachusetts                     413 545-2859 (W)
>Amherst, MA 01003-4515
>
>

```

• Prev by Date: Re: LogLogPlot trouble
• Next by Date: Re: Setting up a probability problem
• Previous by thread: Re: Contour curves & sections onto a surface
• Next by thread: Re: Contour curves & sections onto a surface