love.math.triangulate

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Triangulate a simple polygon.

Function

Synopsis

triangles = love.math.triangulate( polygon )

Arguments

table polygon
Polygon to triangulate. Must not intersect itself.

Returns

table triangles
List of triangles the polygon is composed of.

See Also

Other Languages