• Triangulates a polygon and returns a list of triangles.

    Parameters

    • pointArray: Point[]

      The list of polygon vertices.

    • area: number = 100

      Maximum area for each resulting triangle.

    • isConvex: boolean = false

      Indicates whether the polygon is isConvex.

    • optimize: boolean = false

      Indicates whether to optimize the triangulation.

    Returns Point[][]

    An array of triangles.