Issue #7: polygon triangulation algorithm