Earclip#

arcade.earclip.earclip(polygon: Sequence[Tuple[float, float]]) List[Tuple[Tuple[float, float], Tuple[float, float], Tuple[float, float]]][source]#

Simple earclipping algorithm for a given polygon p. polygon is expected to be an array of 2-tuples of the cartesian points of the polygon For a polygon with n points it will return n-2 triangles. The triangles are returned as an array of 3-tuples where each item in the tuple is a 2-tuple of the cartesian point.

Implementation Reference: