title: Simple 2d polygon triangulation
body: <p>Trying to triangulate a set of <strong>simple 2d polygons</strong>, I've come up with this algorithm:</p>
  
  <ul>
  <li>1) For each vertex in the polygon, compute the angle between the two linked edges</li>
  <li>2) Sort vertices by decreasing angle relative to the interior of the polygon</li>
  <li>3) If there is less than 3 vertices in the set, we're done</li>
  <li>4) Take the last vertex in the set and output the triangle formed by it and its two neighbours</li>
  <li>5) Remove the vertex from the set</li>
  <li>6) Update the angle of the two neighbours</li>
  <li>7) Jump to 2</li>
  </ul>
  
  <p>I've tested it, and found it to work even on really big and complicated <strong>simple 2d polygon</strong> (it don't work for polygon with a hole or self intersecting polygons).</p>
  
  <p>Is there corner cases that will produce degenerate result?</p>
  
  <p>Does this algorithm is a known one?</p>
  
  <p>If not, I would like to be sure this algorithm is rock solid but I have not the mathematical background to prove it.</p>
  
  <p>Thanks a lot.</p>