I have 2D polygons, each of which is a list of coordinates in a clockwise direction. Polygons are simple (i.e., they can be concave, but they do not intersect), and they do not intersect with each other.
I need to split these polygons into smaller polygons so that they fit the size constraints. Like the original polygons, the smaller ones must be simple (non-self-intersecting), and the restriction is that each of them must fit into one โunit squareโ (which for simplicity I can take as 1x1).
The fact is that I need to do this as efficiently as possible, where "effective" means the minimum number of received (small) polygons. The calculation time is not important.
Is there any smart algorithm for this? At first I thought about recursively dividing each polygon (dividing it in half, either horizontally or vertically, depending on which direction is larger), but I do not seem to get very optimal results from this. Any ideas?
source share