Re: [Algorithms] Simple algorithm for regular polygon union
Brought to you by:
vexxed72
|
From: Graham R. ARA/S. <gr...@ar...> - 2009-05-05 18:24:02
|
Note that if you union two convex polygons, the result is not necessarily convex. And, would result in two loops if the source polygons don't intersect each other or if one isn't contained in the other. You probably realize this, but I thought I'd point it out. David Eberly's open source WildMagic engine has a sample application for performing Boolean set operations on polygons...not necessarily convex, but of course does handle those. Here is a link: http://www.geometrictools.com/SampleFoundation/Polysolid2D/Polysolid2D.html You can download a fairly minimal set of code (you don't need the entire engine...only a few files) and it does work as advertised. That is based on BSP trees, which a lot of people like but is not my personal preferred approach. My own preferred approach to doing Polygon Booleans (and again, not restricted to convex), and the one I have used in my code, is based on a paper by Greiner and Hormann, "Efficient Clipping of Arbitrary Polygons," ACM Transactions on Graphics, Vol. 17, No. 2, April 1998, pp 71-83. This is a very straightforward paper. I am sure there is something that is tuned for convex polygons, but I can't point you to anything that specific. Graham -----Original Message----- From: Jose Marin [mailto:jos...@ya...] Sent: Tuesday, May 05, 2009 12:31 PM To: gda...@li... Subject: [Algorithms] Simple algorithm for regular polygon union Hi, I have found some libraries in the net to perform polygon operations, but I need a very simple one: union of closed convex polygons. Do you know any? Thank you. Jose Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |