triangulate function

Triangulate a two-dimensional polygon