Implemented polygon triangulation