MathGroup Archive 1999

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

Search the Archive

Re: PolygonIntersections, MeshRange: What do they do?(Amendment)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20678] Re: PolygonIntersections, MeshRange: What do they do?(Amendment)
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sun, 7 Nov 1999 02:10:11 -0500
  • References: <7vrcg0$2nq@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Further to my previous posting:
It seems that with PolygonIntersetions -> False, *all* polygons are
triangulated in a way that gives non intersecting triangles.
I had also misinterpreted the coloring
For convenience I give an amended version of the original posting:


PolygonIntersections

I must just take the book's statement that "PolygonIntersections -> False is
useful in creating graphics objects which can be sent to certain external
three­dimensional rendering programs"
Perhaps someone else will enlarge on this, but here are some experiments:

gr = Show[Graphics3D[{Polygon[{{0, 0, 0}, {2, 2, 2}, {0, 2, 2}}],
        Polygon[{{0, 2, 1}, {0, 0, 1}, {3, 2, 1}}],
        Polygon[{{1, 0, 0}, {3, 0, 0}, {3, 2, 1}, {1, 2, 0}}]}]
    ]

InputForm[gr]

gr2 = Show[gr, PolygonIntersections -> False]

Why no display? Maybe for convenience in exporting to external 3D rendering
programs?
But we have

Show[gr2]

It looks as if the non-planar quadrilateral has been triangulated.

But there is more:

Looking at the input form we see that:
- *all* polygons have been triangulated, and in a way that gives non
intersecting triangles.
- colors are given explicitly using FaceForm (it turns out that thes are the
colors as seen in the original)
- the original polygon edges are suppressed with EdgeForm[ ] and are
provided by explicit Line objects

However, the colors given by FaceForm are not used unless we set
Lighting ->False, hence the effect of triangulation on the non-planar
quadrilateral .

InputForm[gr2]

Turning the lighting off. removing lines and EdgeForm[ ] shows up the
triangulation and the (original) coloring from FaceForm.

Show[DeleteCases[gr2, _EdgeForm | _Line, Infinity],
  Lighting -> False]


Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

Ersek, Ted R <ErsekTR at navair.navy.mil> wrote in message
news:7vrcg0$2nq at smc.vnet.net...
>
> When would I want to use the options below?  I checked the documentation
and
> I still don't understand.
>
> In[1]:=
> Options[Graphics3D, PolygonIntersections]
>
> Out[1]=
> {PolygonIntersections -> True}
>
> -------------------
>
> In[2]:=
> Options[SurfaceGraphics, MeshRange]
>
> Out[2]=
> {MeshRange -> Automatic}
>
> --------------------
> Regards,
> Ted Ersek
>
> For Mathematica tips, tricks see
> http://www.dot.net.au/~elisha/ersek/Tricks.html
>
>
>



  • Prev by Date: Re: Solution of this equation
  • Next by Date: Re: RasterArray doesn't work
  • Previous by thread: Simplifying Matrix Product
  • Next by thread: Re: TeX -> Mathematica