I've recently discovered Bala R. Vatti's article "A Generic Solution To
Polygon Clipping" (CACM, July '92) which describes an algorithm for
intersecting (or unioning or differencing) any two arbitrary polygons, which
may self-intersect or have multiple contours. Cool stuff, and something I
really need for my current project.
The article has a good description of the algorithm, but it's a pretty
complex beast and I'd much rather find some existing source code (C
preferable but I'll take anything) that I can use or at least consult for
Does anyone have such code or know where I can find it?
I'd also be interested in source code for other generic polygon clippers. I
do need to handle pairs of arbitrary polygons with multiple contours. If the
algorithm is good enough I'm willing to live without self-intersection...
Please reply by e-mail. If I get any good responses I'll summarize them here.
This sound has no waves
--Jens Alfke This sound has no waves
.apple.com Through fog and other grey things
--Dog Faced Hermans