polygons and new triangulate function