Skip to main content

remove_collinear_vertices

Function remove_collinear_vertices 

Source
pub fn remove_collinear_vertices<T: Number>(
    polygon: Polygon<T, 3>,
) -> Option<Polygon<T, 3>>
Expand description

Remove collinear interior vertices from a polygon.

A vertex b between a and c is collinear when the cross product (b - a) × (c - a) has near-zero magnitude relative to the edge lengths.