Weiler-Atherton polygon clipping
> Can anyone point me in the right direction to obtain actual working source
> code for the above algorithm. Various books mention it and describe it
> but none I have seen so far give a complete listing.
FAQ Subject 5.04: How do I clip a polygon against another polygon?
some code in C++ to perform clipping of two possibly concave 2-D
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:
Weiler, K. "Polygon Comparison Using a Graph Representation", SIGGRAPH 80
Vatti, Bala R. "A Generic Solution to Polygon Clipping",
Communications of the ACM, July 1992, Vol 35, No. 7, pg. 57-63