Re: Re: 3D graphics domain
- To: mathgroup at smc.vnet.net
- Subject: [mg55783] Re: [mg55762] Re: 3D graphics domain
- From: DrBob <drbob at bigfoot.com>
- Date: Wed, 6 Apr 2005 03:11:12 -0400 (EDT)
- References: <d2tesa$qj2$1@smc.vnet.net> <200504050945.FAA00513@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Did you test that code? You had "=" where you must have meant "<=" or ">=" (three times). 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)), Gray, White]; Plot3D[{f[x, y], s[x, y]}, {x, -1, 2}, {y, 0, 3}, PlotPoints -> 50, Mesh -> False] Notice the If turns out to be false throughout the plotted region. Bobby On Tue, 5 Apr 2005 05:45:12 -0400 (EDT), dh <dh at metrohm.ch> 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 >> > > > > -- DrBob at bigfoot.com
- References:
- Re: 3D graphics domain
- From: dh <dh@metrohm.ch>
- Re: 3D graphics domain