MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Question on plotting parametric surfaces

  • To: mathgroup at
  • Subject: [mg20893] RE: [mg20880] Question on plotting parametric surfaces
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Sat, 20 Nov 1999 01:07:07 -0500 (EST)
  • Sender: owner-wri-mathgroup at


I have a question on plotting surfaces: I have a surface z=f(x,y) and I
would like to plot it over a nonrectangular but arbitrary domain on the
plane X-Y, (for example, suppose such a domain is defined by its boundary,
a set of curves I know). How can I do that?

I already knew that ParametricPlot and ParametricPlot3D can draw parametric
curves and surfaces. But my problem is related to the domain of parametric
Suppose I have the following domain D:


and the function


I'd like to display this function only over the given domain, but not over
a rectangular domain, as the ParametricPlot3D does. 

I will show how to do this where (x,y) are swapped in f[x,y] because the
graphics look neater that way.  I also display it with a hole in the middle.

This is based on a solution in The Mathematica Journal 5(1):15.
The trick is to change variables and reparameterize. Obviously this trick
can be applied to a wide variety of situations.


ParametricPlot3D[{r Cos[ang],r Sin[ang],f[r Cos[ang],r Sin[ang]]},

(* Graphics3D not shown. *)

If you don't want to see the mesh use the next line.  Wouldn't it be nice if
we could use options Mesh, MeshStyle instead of that damn EdgeForm[] thing.

ParametricPlot3D[{r Cos[ang],r Sin[ang],f[r Cos[ang],r

He also wrote:
Another interesting thing I'd like to do:

how can I consider restrictions over this domain D, for example, arbitrary
holes? Suppose, for example, that the holes' boundaries are defined by a
set of composite Bezier or b-spline curves.
You could do is make Graphics3D primitives for the holes that are the same
color as the background and Show them over the primitives from

Ted Ersek

For Mathematica tips, tricks see

  • Prev by Date: Re: challenge: phone number to words
  • Next by Date: Re: Orderless indexed functions
  • Previous by thread: What kind of math problem is this?
  • Next by thread: Re: Question on plotting parametric surfaces