Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Graphics3D and polygons

  • To: mathgroup at
  • Subject: [mg15816] Re: Graphics3D and polygons
  • From: "Allan Hayes" <hay at>
  • Date: Mon, 8 Feb 1999 03:25:42 -0500 (EST)
  • References: <79jggg$>
  • Sender: owner-wri-mathgroup at

Dr. Christopher J. Purcell wrote in message <79jggg$sas at>...
>This may just be finger trouble but I can't get nonconvex polygons to
>plot correctly under Graphics3D with either V2.2 or V3.0. The only
>reference I can find is
> but
>it causes an unacceptable performance hit. Any faster fixes known? Here
>is an example of the problem...
>(2D polygon works fine - gives a red bow tie *)
>Show[Graphics[{RGBColor[1, 0, 0],
>{100, 100},{50,80},{0, 100},{0, 0}
>(* same polygon as above in 3D is drawn wrong *)
>Show[Graphics3D[{RGBColor[1, 0, 0],
>{100, 100},{50,80},{0, 100},{0, 0}


In 2D the interior (colored part) of a polygon is taken to be the set of
points around which the winding number of  the perimeter path  is

In3D the polygon is split into triangles by joining the first point to
successive pairs of points {{p1,p2,p3},{p1,p3,p4}, ...} For the purpose
of coloring by simulated lighting, all of  these triangles are colored
with the color calculated for the first triangle (from its normal and
the light sources).

The only fix seems to  be to reorder the points or even triangulate
yourself - and that could alter the simulated coloring - but  you would
be OK with explict coloring by Hue etc.

In this case, rotating the points to the left gives a bow tie

Show[Graphics3D[{RGBColor[1, 0, 0],
            {100, 100},{50,80},{0, 100},{0, 0}



Allan Hayes
Mathematica Training and Consulting
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

  • Prev by Date: Re: BracketingBar for output
  • Next by Date: Re: FindRoot behaving funny?
  • Previous by thread: Graphics3D and polygons
  • Next by thread: Re: Graphics3D and polygons