Polygon Polygon Clipping
From CGAFaq
Klamer Schutte, klamer@ph.tn.tudelft.nl has developed and implemented some code in C++ to perform clipping of two possibly concave 2D polygons. A description can be found at:
To compile the source code you will need a C++ compiler with templates, such as g++. The source code is available at:
See also http://members.xoom.com/msleonov/pbcomp.html, which extends the above to permit holes.
Alan Murta released a polygon clipper library (in C) which uses a modified version of the Vatti algorithm:
Angus Johnson has released a freeware polygon clipping library written in Delphi (Pascal) and also in C++ which is based on the Vatti algorithm:
[edit]
References
- Weiler, K. "Polygon Comparison Using a Graph Representation", SIGGRAPH '80, pg. 10-18
- Vatti, Bala R. "A Generic Solution to Polygon Clipping", Communications of the ACM, July 1992, Vol 35, No. 7, pg. 57-63

