Randall Hopper:
 |Also, how do you take a vertex list and turn it into a polygon (face,
 |loop, edges) inside a DX network?

After reading up on how DX stores polygons, it wasn't hard to write a naive
"points to polygon" macro with the polygon as a single loop (attached).

But it has a problem:  DX renders self-intersecting polygons/faces in
somewhat surprising ways.  Dave Thompson has noticed this too.  (The
attached DX script demonstrates.)

Should DX handle this case?  Or is it, as in GIS, invalid to have a loop
edge split by the boundary of the loop (even if there's no "neighbors"
field component to worry about)?

If the latter, is there a way in DX to tesselate the polygon so that its
form is acceptable?

Thanks,

Randy

-- 
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA MD/24 ERC-1A; RTP, NC 27711
include "PointsetToSimplePolygon.net"

points = Construct( {[-1,-1],[-1,1],[0,0],[1,-1],[1,1]} );
poly   = PointsetToSimplePolygon( points );

polyc  = Color( poly, "yellow" );
conn   = ShowConnections( polyc );
objs   = Collect( polyc, conn );
camera = AutoCamera( objs );
image  = Render( objs, camera );
Display( image );

KeyIn( "Hit ENTER to continue..." );

<<attachment: PointsetToSimplePolygon.zip>>

Reply via email to