title: Creating a surface of triangles from a set of 2D points
body: <p>I have a set of points and I need to convert the set to (non-overlapping) triangles (or a big polygon if equivalent)...</p>
  
  <p>The application: I have a list of locations (latitude,longitude) from a country, and I need to find if a given point is inside the counrty or not...</p>
  
  <pre><code>X         X                   *---------*                       *---------*
                                | \     / | \                     |           \
                                |   \ /   |   \                   |             \
       X         x      =&gt;      |    *    |    *      = or =&gt;     |              *
                                |   / \   |   /                   |             /
                                | /     \ | /                     |           /
  X         X                   *---------*                       *---------*
  </code></pre>
  
  <p>Is there an easy way or do I need a PhD to code it?</p>
  
  <p>Or with a huge polygon?  I found <a href="http://en.wikipedia.org/wiki/Point_in_polygon" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Point_in_polygon</a></p>
  
  <p>Thx,
  JD</p>