MathGroup Archive 2005

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

Search the Archive

Re: 3D graphics domain

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55806] Re: 3D graphics domain
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 6 Apr 2005 03:12:10 -0400 (EDT)
  • References: <d2tesa$qj2$1@smc.vnet.net> <d2tnns$nr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
Bobby pointed out that in the definition of s[] the <= and >= have been 
wrongly replaced by =. The correct code is therefore:

  f[x_, y_] = -64*x +  320*(x^2) - 512*(x^3) + 256*(x^4) + 20*y - 64*x*y 
+ 64*(x^2)*y - 4*(y^2);
s[x_, y_] = If[(y <= 4*x*(1 - x)) && (y >= 4*x*(1 - 2x)) && (y >= 4*(x -
1)*(1 - 2x)), Hue[1], Hue[0.5]];
Plot3D[{f[x, y], s[x, y]}, {x, 0, 1}, {y, 0, 1}, PlotPoints -> 50]


dh wrote:
> Hi Dick,
> you may simply plot your function on a rectangular region and color the 
> valid region differently. E.g.:
> 
> f[x_, y_] = -64*x +  320*(x^2) - 512*(x^3) + 256*(x^4) + 20*y - 64*x*y + 
> 64*(x^2)*y - 4*(y^2);
> s[x_, y_] = If[(y = 4*x*(1 - x)) && (y = 4*x*(1 - 2x)) && (y = 4*(x - 
> 1)*(1 - 2x)), Hue[1], Hue[0.5]];
> Plot3D[{f[x, y], s[x, y]}, {x, 0, 1}, {y, 0, 1}, PlotPoints -> 50]
> 
> Sincerely, Daniel
> 
> 
> Richard Bedient wrote:
> 
>>Thanks to Bob and Dan for helping me get this far. Again, I've exhausted
>>my Mathematica knowledge along with anything I can find in the Help
>>files.  I now need to take the function they found for me and graph it
>>in 3D over a restricted domain. Here's the problem:
>>
>>Graph the function
>>
>>f(x,y) = -64*x + 320*(x^2) - 512*(x^3) + 256*(x^4) + 20*y - 64*x*y +
>>64*(x^2)*y - 4*(y^2) 
>>
>>over the domain:
>>
>>y <= 4*x*(1-x)
>>y >= 4*x*(1 - 2x)
>>y >= 4*(x - 1)*(1 - 2x) 
>>
>>Thanks for any help.
>>
>>Dick
>>
> 
> 


  • Prev by Date: Re: NMinimize--problem with a min-max problem
  • Next by Date: Re: NMinimize--problem with a min-max problem
  • Previous by thread: Re: 3D graphics domain
  • Next by thread: Re: 3D graphics domain