In a plane, we have a convex polygon with n sides. What would be the maximum number of disconnected pieces / fragments if this polygon is clipped against a square?
-
Can the pieces be of arbitrary shape, or do you require concave pieces to be decomposed into convex pieces? – trichoplax is on Codidact now May 01 '16 at 08:26
-
2When you say "clipped", can we assume that the inside of the square is discarded, and we are counting the number of disconnected pieces left outside the square? – trichoplax is on Codidact now May 01 '16 at 08:28
1 Answers
A convex polygon has the property:
A line drawn through a convex polygon will intersect the polygon exactly twice.
From this follows that any line trough splits the convex polygon in 2 pieces.
Image 1: convex polygon split by a line.
Using this, and assuming the inner piece is discarded we can craw the conclusion that there are five cases:
- When the lines of the square do not exit the polygon. You now have a piece with a hole or the entire polygon is contained and theres no hole and no piece.
- When the lines exit 2 times you have one fragment*
- when the lines exit 4 times you have two fragments*
- when the exits are 6 times you have three fragments*
when the exits are 8 times you have four fragments *
Image 2: the five cases, clipping rectangle and remaining shards in black. Even a squares has same cases if the polygons vary, just easier to draw this way.
The last case is the maximum so answer is four or five if you count the clipped part as one piece.
* Since we haven't tackled the cases very rigorously we know that this is the highest possible answer, there could be less for each case. There shouldn't be but I so far haven't given evidence for that. But thats okay it wasn't asked.

- 8,437
- 1
- 24
- 47
-
What about the case where one corner of the square is inside the polygon and all others are outside? – RichieSams May 08 '16 at 14:08
-
1@RichieSams its the same case as splits into one shard, it exits 2 times and results in one concave shard. – joojaa May 08 '16 at 14:56
-
1@trichoplax right i can add that. There shouldn't be less, but see i added the or less for your comment. I am not sure i have proven there isn't a smaller case (i could), there shouldn't be but i haven't laid out the proof very well for that case, not rigorous enough. I have however proven that there are no more cases than 4 and since i can find a 4 it proves that is maximum which is enough to answer the question at hand. – joojaa May 08 '16 at 20:11
-