Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: 3D graphics domain

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55790] Re: 3D graphics domain
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 6 Apr 2005 03:11:27 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <d2tesa$qj2$1@smc.vnet.net> <d2tnjj$mt$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The correct code for the forgotten upper[] and 
lower[] is

lower[{x_, y_, _}] := Min[y - 4*x*(1 - 2x), y - 
4*(x - 1)*(1 - 2x) - y]
upper[{x_, y_, _}] := 4*x*(1 - x) - y

Regards
  Jens

"Jens-Peer Kuska" 
<kuska at informatik.uni-leipzig.de> schrieb im 
Newsbeitrag news:d2tnjj$mt$1 at smc.vnet.net...
> 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
>>
>
> 



  • Prev by Date: Re: Re: 3D graphics domain
  • Next by Date: Re: 3D graphics domain
  • Previous by thread: Re: 3D graphics domain
  • Next by thread: Re: 3D graphics domain