Skip to main content

monotone_subdivision

Function monotone_subdivision 

Source
pub fn monotone_subdivision<Pg, P>(polygon: &Pg) -> Vec<Polygon<P>>
where Pg: Polygon<Point = P>, P: Point<Scalar = f64> + Copy, P::Cs: CoordinateSystem, <P::Cs as CoordinateSystem>::Family: SameAs<CartesianFamily>,
Expand description

Subdivide a Cartesian polygon into y-monotone owned polygons.

The current native contract returns triangular pieces; triangles are valid y-monotone polygons and preserve the source area exactly up to floating-point arithmetic.