MathGroup Archive 2000

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

Search the Archive

RE: Re: Plotting bounded domains

Gurzen and everybody,

I made an earlier reply to this question where I assumed that the original
poster wanted a contour plot of the function. However, Bob Hanlon assumed a
Plot3D type solution. The DrawingCube package also allows that type of plot.
It plots only in the desired region and it does not produce a jagged edge
along one side as the Hanlon solution does. Here is the code:


IteratorSubstitution[x y, {y, 0, x}]
{w*x^2, {w, 0, 1}}

	{Draw3D[w x^2, {x, 0, 2}, {w, 0, 1}] /.
          DrawingTransform3D[Function[{x, w, z}, x], Function[{x, w, z}, x
             Function[{x, w, z}, z]]}],

AspectRatio -> Automatic, PlotRange -> {{0, 2}, {0, 2}, {0, 4}}];

The Drawing packages can be downloaded from my web site below.

David Park
djmp at

> From: Gurzen Nezrug [mailto:gurzen at]
To: mathgroup at
> Hello bob and group,
> I would like to second the question and object the answer.
> Bob Hanlon nice trick result with a function which is f(x,y)=x*y in the
> wanted region and f(x,y)=0 outside. But what I want, and possibly what
> jgregory wants (If I'm allowed to guess) is to see only the inner part and
> nothing on the outer part (i.e. clear background). To justify my question,
> suppose that f(x,y) is now 0 for x<1, how can we tell between the
> real 0 and
> the "outside the region" 0 ?!?
> Is there a way to get such plot other then parametrizing  the
> area "by hand"
> (which might not be simple) and using ParametricPlot3D?
> I would like to add, knowing software such as MATLAB (I hope it is not
> forbidden to mention this name here) assigning a value of NaN to
> a function
> or a matrix (stands for "Not a Number") means that this point will simply
> not be shown in graphics plot. Is there a way to achieve the same within
> mathematica?
> Thank you all,
> BobHanlon at wrote in message <8dnvsh$hua at>...
> >f[x_, y_] := x*y;
> >
> >region[x_, y_] :=
> >     (UnitStep[x] - UnitStep[x - 2.])*(UnitStep[y] - UnitStep[y - x]);
> >
> >Plot3D[f[x, y]*region[x, y], {x, -0.5, 2.5}, {y, -0.5, 3.5},
> >    PlotPoints -> 35, AxesLabel -> {"x", "y", "z"},
> >    ViewPoint -> {1.300, -2.400, 2.000}];
> >
> >Bob Hanlon
> >
> >In a message dated 4/19/2000 2:44:33 AM, jgregory at writes:
> >
> >>    In Mathematica, how does one plot a bounded and closed domain in R^2
> >>that includes variables? For example let R be y=x; x=2; y = 0; for the
> >>function,  f(x,y) = x*y.
> >>
> >

  • Prev by Date: Re: fastest way to do pair-sum / make pair-list
  • Next by Date: Fit with constraints?
  • Previous by thread: RE: Plotting bounded domains
  • Next by thread: RE: Re: Plotting bounded domains