The question I have here is quite hard for me to describe in words… So I’ll use Pictures!
In general, The issue I have is as follows:
Say I have Polygon A:
Which is intersected at two points by an open polygon B:
What algorithm can I form two closed polygons out of this intersection? (Note that there are three solutions here the one I’m searching for is highlighted)
The preferable solution is
- The Smallest of all solutions given that:
- A does not contain B
So, any suggestions on how to generate B (and a new A) after the intersection takes place? I’m new to Polygon Math (and 2D Shape interaction in general) so I have no idea where to start or where to look!