MathGroup Archive 2003

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

Search the Archive

Re: Plotting 3D with regions with non constant limits

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38712] Re: Plotting 3D with regions with non constant limits
  • From: atelesforos at hotmail.com (Orestis Vantzos)
  • Date: Mon, 6 Jan 2003 03:43:21 -0500 (EST)
  • References: <av95bi$sds$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

RegionPlot3D[expr_, {x_, m_, M_}, {y_, mx_, Mx_}] := 
  With[{Y = (1 - L) mx + L Mx}, 
    ParametricPlot3D[Evaluate[Simplify[{x, Y, expr /. y -> Y}]],
      {x, m, M}, {L, 0, 1}]
  ]

Use like this:
RegionPlot3D[x - y, {x, -1, 1}, {y, 0, 1 - x^2 ]}];

The catch, and the basic reason Plot3D does not answer your calls, is
that the lower and upper limits in the dependent variable should be in
the proper order for all the values in the independent variable's
domain. This is not always obvious.
Another reason, that becomes obvious if you check enough
RegionPlot3Ds, is that the uniform L variation is not the best
possible, so the sampling is not always good-looking and you get sort
of abnormal grids on the surface.

Orestis

fhjdeboer at raketnet.nl (Frans de Boer) wrote in message news:<av95bi$sds$1 at smc.vnet.net>...
> Hello everybody,
> 
> Consider the following problem
> 
> Plot3D[x + y, {y, 0, 1 - x^2}, {x, -1, 1}]
> or
> Plot3D[x + y, {x, -1, 1},{y, 0, 1 - x^2}]
> 
> Both are not accepted because Mathematica demands constant limiting values
> for both x and y.
> This seems strange to me.
> Is there a way to plot a function of two variables where the limiting values
> of one depend on the other?
> 
> I solved the problem by plotting
> 
> ParametricPlot3D[{r Cos[t], r^2 (Sin[t])^2,r^2 (Sin[t])^2 + r Cos[t]}, {t,
> 0, \[Pi]}, {r, 0, 1}]
> 
> but in general I find this to complicated.
> 
> Is there a direct way?
> 
> Sincerely,
> 
> Frans de Boer


  • Prev by Date: Re: Design problem in 4.2?
  • Next by Date: RE: Plotting 3D with regions with non constant limits
  • Previous by thread: Re: Plotting 3D with regions with non constant limits
  • Next by thread: RE: Plotting 3D with regions with non constant limits