Re: planar polygon plot
- To: mathgroup at smc.vnet.net
- Subject: [mg16417] Re: planar polygon plot
- From: adam.smith at hillsdale.edu
- Date: Sat, 13 Mar 1999 02:21:36 -0500
- Organization: Deja News - The Leader in Internet Discussion
- References: <7c6fad$i0s$7@dragonfly.wolfram.com>
- Sender: owner-wri-mathgroup at wolfram.com
In article <7c6fad$i0s$7 at dragonfly.wolfram.com>, Richard S Hsu <rhsu at U.Arizona.EDU> wrote: > Hi, > > I want to plot a planar polygon in 3D with shading. > when the polygon is concave, the shading could be wrong. > > For a simple example: > > Show[ Graphics3D[ Polygon[ { {0,0,0}, {1,0.5,0}, {2,0,0}, > {2,2,0}, {1,1.5,0}, {0,2,0} } ] ] ]; > > I know what Mathematica is doing here, but want to know > if there is a easy way to get correct shading for general > 3D planar polygons. > > Thanks > > I am not sure what you mean by the shading being off. But try changing the order of the points. I think the input below will produce what you want. I found it by trial and error - I don't understand why it makes a difference to Mathematica. Show[ Graphics3D[ Polygon[ { {1,0.5,0}, {2,0,0}, {2,2,0}, {1,1.5,0}, {0,2,0},{0,0,0} } ] ]; Adam Smith -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own