Merge Overlapping Polygons
I am trying to merge overlapping polygons into a single polygon to be rendered as a GL_LINE_LOOP, so really an outline of the merged polygons.
The polygons are simple, may be convex or concave, and are 2D.
I am currently using the glu tesselator to try and do this. I have set the glu properties and rules to
I start the polygon, render the first polygon as a contour, then render the second polygon as another contour, then end the polygon.
The glu tesselator gives a close answer, but some vertices will randomly go way off in either the x or y direction. If anyone has any ideas how to fix this or knows of a general polygon merging algorithm, I would greatly appreciate it.
This link shows what I am trying to do.