title: Given an irregular polygon's vertex list, how to create internal triangles to build a flat 3D mesh efficiently?
body: <p>I'm using Unity, but the solution should be generic.
  I will get user input from mouse clicks, which define the vertex list of a closed irregular polygon.
  That vertices will define the outer edges of a flat 3D mesh.</p>
  
  <p>To procedurally generate a mesh in Unity, I have to specify all the vertices and how they are connected to form triangles.</p>
  
  <p>So, for convex polygons it's trivial, I'd just make triangles with vertices 1,2,3 then 1,3,4 etc. forming something like a Peacock tail.</p>
  
  <p>But for concave polygons it's not so simple.
  Is there an efficient algorithm to find the internal triangles?</p>