<p>A convex polygon has the property:</p>

<ul>
<li><p>A line drawn through a convex polygon will intersect the polygon exactly twice.</p>

<p>From this follows that any line trough splits the convex polygon in 2 pieces.</p>

<p><a href="https://i.sstatic.net/uyM6r.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uyM6r.png" alt="enter image description here"></a></p>

<p><strong>Image 1</strong>: convex polygon split by a line.</p></li>
</ul>

<p>Using this, and assuming the inner piece is discarded we can craw the conclusion that there are five cases:</p>

<ol>
<li>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.</li>
<li>When the lines exit 2 times you have one fragment*</li>
<li>when the lines exit 4 times you have two fragments*</li>
<li>when the exits are 6 times you have three fragments* </li>
<li><p>when the exits are 8 times you have four fragments *</p>

<p><a href="https://i.sstatic.net/OwHAq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OwHAq.png" alt="enter image description here"></a></p>

<p><strong>Image 2</strong>: 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.</p></li>
</ol>

<p>The last case is the maximum so answer is <strong>four</strong> or five if you count the clipped part as one piece. </p>

<p>* 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.</p>

CC BY-SA 3.0
2016-05-08T14:08:51.740Z
What about the case where one corner of the square is inside the polygon and all others are outside?
RichieSams
CC BY-SA 3.0
2016-05-08T14:56:47.270Z
@RichieSams its the same case as splits into one shard, it exits 2 times and results in one concave shard.
joojaa
CC BY-SA 3.0
2016-05-08T20:11:39.083Z
@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
CC BY-SA 3.0
2016-05-08T20:24:26.147Z
@joojaa fair point.
trichoplax is on Codidact now
CC BY-SA 3.0
2016-05-07T06:40:03.413Z
2016-05-08T20:18:18.947Z
2016-05-08T20:18:18.947Z
joojaa
<p>In a plane, we have a <strong>convex</strong> polygon with n sides. What would be the maximum number of disconnected pieces / fragments if this polygon is clipped against a square?</p>

CC BY-SA 3.0
2016-05-01T08:26:58.217Z
Can the pieces be of arbitrary shape, or do you require concave pieces to be decomposed into convex pieces?
trichoplax is on Codidact now
CC BY-SA 3.0
2016-05-01T08:28:36.027Z
When 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
<polygon>
Finding the maximum number of disconnected fragments
Sharmishtha
# Finding the maximum number of disconnected fragments

(Asked by: username_0 on 2016-05-01)

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?

**Tags:** polygon

> **Comments:**
> **username_1**: Can the pieces be of arbitrary shape, or do you require concave pieces to be decomposed into convex pieces?  
> **username_1**: When 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?  

---

## 1 answers

### Answer by username_2 on 2016-05-07. Score: 3

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.

  [![enter image description here](https://i.sstatic.net/uyM6r.png)](https://i.sstatic.net/uyM6r.png)

  **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:

1. 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.
2. When the lines exit 2 times you have one fragment\*
3. when the lines exit 4 times you have two fragments\*
4. when the exits are 6 times you have three fragments\*
5. when the exits are 8 times you have four fragments \*

   [![enter image description here](https://i.sstatic.net/OwHAq.png)](https://i.sstatic.net/OwHAq.png)

   **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.

> **Comments:**
> **username_3**: What about the case where one corner of the square is inside the polygon and all others are outside?  
> **username_2**: @username_3 its the same case as splits into one shard, it exits 2 times and results in one concave shard.  
> **username_2**: @username_1 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.  
> **username_1**: @username_2 fair point.  

---

