MathGroup Archive 2002

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

Search the Archive

Re: plotting with boundary conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34509] Re: [mg34482] plotting with boundary conditions
  • From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
  • Date: Fri, 24 May 2002 02:42:14 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

You can do the following:

In[1]:=
  c[a_,b_]:=0.1*(a-1)^2+0.1*(b-1)^2-0.01

In[2]:=
f[a_, b_] :=a^2-2*c[a,b]+b^2

In[3]:=
<<Graphics`InequalityGraphics`

In[4]:=
InequalityPlot3D[-10^-3< z-f[a, b]< 10^-3&&c[a,b]<a b, {a,0,2}, 
{b,0,2},{z}]
(Graphic suppressed)

You will get "the same" picture if you use any small epsilon in 
-epsilon < z-f[a, b]< epsilon in the first argument to InequalityPlot3D, 
but

InequalityPlot3D[ z==f[a, b]&&c[a,b]<a b, {a,0,2}, {b,0,2},{z}]

will produce no graphic. This however is just the way InequalityPlot3 
works, the graphic that you get using small bounds like those above is 
correct.

Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/

On Thursday, May 23, 2002, at 04:32  PM, Tayade Rajeshwary Gunwant wrote:

>
> Hi all,
>   I need to plot a surface
>   f(a,b) = a^2-2*c(a,b)+b^2; given the boundary conditions c(a,b)< ab
>
>   Here c(a,b) is another function of (a,b) given by
>   c(a,b) = 0.1*(a-1)^2+0.1*(b-1)^2-0.01
>
> Is there a direct command to set these boundary conditions...?? If i 
> give
>
> f[a_, b_] := If[c[a, b] < a*b, a^2 + b^2 - 2*c[a, b],];
>
> Plot3D[f[a, b], {a, 0, 2}, {b, 0, 2}, AxesLabel -> {"a", "b", "f"},
>   ViewPoint -> {2, 2, 2}]
>
> I get error messages for the values of a and b for which f(a,b) doesnot 
> exist.
>
> Can anybody please tell me how i can get this plot?
>
> Thanks
> raj
>
>
>
>



  • Prev by Date: RE: plotting with boundary conditions
  • Next by Date: Re: Options
  • Previous by thread: RE: plotting with boundary conditions
  • Next by thread: RE: plotting with boundary conditions