Function triangulate

Source
pub fn triangulate(
    points: &[Point2],
    constraints: &[Constraint],
) -> Result<Triangulation, TriangulationError>
Expand description

Build a constrained Delaunay triangulation of points.

Every edge in constraints appears in the output as an edge of some triangle. Away from constraints the result satisfies the Delaunay empty-circumcircle property, decided exactly.

ยงErrors

Returns TriangulationError when the input has fewer than three points, is entirely collinear, references a vertex that does not exist, or contains constraints that cross one another.