Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Re: Plotting bounded domains

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23261] Re: [mg23211] Re: [mg23110] Plotting bounded domains
  • From: Hartmut Wolf <hwolf at debis.com>
  • Date: Sat, 29 Apr 2000 22:05:04 -0400 (EDT)
  • Organization: debis Systemhaus
  • References: <8dnvsh$hua@smc.vnet.net> <200004240512.BAA15297@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Gurzen Nezrug schrieb:
> 
> 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 aol.com wrote in message <8dnvsh$hua at smc.vnet.net>...
> >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 ismi.net 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.
> >>
> >


I would like to add two methods:

(1) define f as:

f[x_, y_] := x*y /; 0 <= y <= x 
f[_, _] = Null

Off[Plot3D::"plnc", Plot3D::"gval"]

Plot3D[f[x, y], {x, 0, 2}, {y, 0, 2}]


(2) manipulate the output

g = Graphics3D[
      Plot3D[x*y, {x, 0, 2}, {y, 0, 2}, DisplayFunction -> Identity]];

g2 = g /. p : Polygon[_] :> (p /. {x_, y_, z_} -> 
              If[y <= x, {x, y, z}, Unevaluated[Sequence[]]]);

Show[g2, DisplayFunction -> $DisplayFunction]

I consider the result (2) as most pleasing.


Kind regards,  Hartmut


  • Prev by Date: Re: fastest way to do pair-sum / make pair-list
  • Next by Date: Re: fastest way to do pair-sum / make pair-list
  • Previous by thread: RE: Re: Plotting bounded domains
  • Next by thread: Piecewise functions