[][src]Function arcs::algorithms::simplify

pub fn simplify<Space>(
    points: &[Point2D<f64, Space>],
    tolerance: Length<f64, Space>
) -> Vec<Point2D<f64, Space>>

Decimate a curve composed of line segments to a "simpler" curve with fewer points.

The algorithm defines "simpler" based on the maximum distance (tolerance) between the original curve and the simplified curve.

You may want to research the Ramer–Douglas–Peucker algorithm for the exact details and assumptions that can be made.

Note

This differs from [Approximate] in that no new points are created, [simplify()] just tries to remove as many points as possible while ensuring the resulting curve is roughly the same shape.