Re: 3D graphics domain
- To: mathgroup at smc.vnet.net
- Subject: [mg55759] Re: 3D graphics domain
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Tue, 5 Apr 2005 05:45:09 -0400 (EDT)
- Organization: Uni Leipzig
- References: <d2tesa$qj2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, a quick and dirty solution may be 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) gg = Graphics3D[ Plot3D[f[x, y], {x, -4, 5}, {y, 1, -100}, PlotPoints -> 256, Mesh -> False, DisplayFunction -> Identity]] /. Polygon[pnts_] /; Length[pnts] > 3 :> Polygon /@ Partition[pnts, 3, 2, {1, 1}]; simpleTest[Polygon[pnts_]] := Module[{cntr}, cntr = Plus @@ pnts/Length[pnts]; upper[cntr] > 0 && lower[cntr] > 0 ] poly = Select[Cases[gg, _Polygon, Infinity], simpleTest]; Show[Graphics3D[{EdgeForm[], poly}, PlotRange -> All, BoxRatios -> {1, 1, 1}]] This draw only polygons with the center is inside of the domain. A longer version would select all polygons that intersect the boundary and compute the intersection polygon that lies inside of the boundary. This gives you a cleaner boundary curve. Regards Jens "Richard Bedient" <rbedient at hamilton.edu> schrieb im Newsbeitrag news:d2tesa$qj2$1 at smc.vnet.net... > 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 >
- Follow-Ups:
- Re: Re: 3D graphics domain
- From: DrBob <drbob@bigfoot.com>
- Re: Re: 3D graphics domain