title: Algorithm to compute the remaining polygon after subtraction
body: <p>I have a big polygon (<code>Pa</code>). Inside the polygon there are a lot of small "holes", as shown:</p>
  
  <p><img src="https://docs.google.com/drawings/pub?id=1byv-VpXd4A8yFY3-P4X68yZHcD9CmeOMMWQm5BMzSBA&amp;w=960&amp;h=720"></p>
  
  <p>Here are a few condition for the holes:</p>
  
  <ol>
  <li>The holes cannot overlap one another</li>
  <li>The holes cannot go outside the outer polygon</li>
  <li>However, the holes <em>can</em> touch the outer polygon edge</li>
  </ol>
  
  <p>How to obtain the remaining polygon ( or the polygon list) in an efficient manner? The easiest way ( brute force way) is to take the <code>Pa</code>, and gradually computing the remaining polygon by subtracting out the holes. Although this idea is feasible, but I suspect that there is a more efficient algorithm. </p>
  
  <p><strong>Edit: I'm not asking about how to perform polygon clipping ( or subtraction) algorithm! In fact that's something I would do by brute force. I'm asking in addition to the polygon clipping method ( take the main polygon and then gradually clip the holes out), is there other more efficient way?</strong></p>