0

I have two polygons which are defined by a list of points:

x1,y1; x2,y2; x3,y3; ...; xn,yn

and I would like to find their union, expressed in the same form.

It would be acceptable to assume that the two overlap leaving no holes. Better, for generality, would be to allow the two polygons to have holes but to fill them in.

Speed is not important in this application; an inefficient algorithm/implementation would be fine. I'm open to any type of answer: a library which solves the task, a, algorithm, or code.

Charles
  • 11,269
  • 13
  • 67
  • 105

1 Answers1

2

You can try Clipper library by Angus Johnson. It may be used with C++, C# and Delphi.

MBo
  • 77,366
  • 5
  • 53
  • 86