A port of poly2tri to C#