MathGroup Archive 1999

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

Search the Archive

Re: Question on plotting parametric surfaces

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20899] Re: [mg20880] Question on plotting parametric surfaces
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 20 Nov 1999 01:07:12 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Andres,

In your particular case, you can use polar coordinates along with ParametricPlot3D.

f[x_, y_] := x^3 - y^4 + 3y - 4x + 2
g[r_, t_] = f[x, y] /. {x -> r Cos[t], y -> r Sin[t]};

ParametricPlot3D[{r Cos[t], r Sin[t], g[r, t]}, {r, 0, 2}, {t, 0, 2 Pi},
    BoxRatios -> {1, 1, 1}, PlotRange -> All, PlotPoints -> {11, 31}];

But in more general cases. where one might want to stitch together surfaces whose
boundaries are determined by auxiliary equations, more general methods are needed.
The basic problem is that the limits in the second iterator in a Plot statement
cannot be variables that depend upon the value of the variable in the first iterator
(as they can in Integrate statements.)

The solution is to use a change of variable, which will give fixed limits in the
second iterator. Of course it also changes the form of the expression being plotted.
My DrawingCube package, available at my web site, has a routine IteratorSubstitution
which performs this transformation and gives the new plotting expression. I am not
certain it will work in every possible case, but it has always worked for me. The
tutorial notebook gives several examples of its use.

This should also work for holes in surfaces, provided you can get equations for their
boundaries and don't mind patching your surface together.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


>Hi, Group,
>
>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 surfaces.
>Suposse I have the following domain D:
>
>x^2+y^2<=4
>
>and the function
>
>f(x,y)=x^3-y^4+3y-4x+2.
>
>I'd like to display this function only over the given domain, but not over
>a rectangular domain, as the ParametricPlot3D does. Another interesting
>thing I'd like to do:
>
>how can I consider restrictions over this domain D, for example, arbitrary
>holes? Supposse, for example, that the holes' boundaries are defined by a
>set of composite Bezier or b-spline curves.
>
>A. Iglesias
>
>                                             __   __ ______
>                                            / /  / // ____/
>-----------------------------------------  / /  / // /  ------------
>ANDRES IGLESIAS PRIETO                    / /__/ // /____
>                                          \_____/ \_____/
>Dpt. of Applied Mathematics           UNIVERSIDAD DE CANTABRIA
>and Computational Sciences
>E.T.S.I. Caminos, Canales y Puertos
>Avda. Los Castros, s/n.
>University of Cantabria           NEW!!!  Phone +34 942  20.17.23
>39005 - Santander                 NEW!!!  Fax   +34 942  20.17.03
>SPAIN                             e-mail iglesias at ccaix3.unican.es
>                       Web page:  http://ccaix3.unican.es/~iglesias
>--------------------------------------------------------------------
>
>
>
>



  • Prev by Date: Re: Orderless indexed functions
  • Next by Date: Re: Orderless indexed functions
  • Previous by thread: RE: Question on plotting parametric surfaces
  • Next by thread: nested FindRoot