Douglas-Peucker path simplification algorithm. Reduces the number of points in a path while preserving its overall shape.
Input array of points
Maximum allowed distance from the simplified line (in the same units as points)
Simplified array of points
Douglas-Peucker path simplification algorithm. Reduces the number of points in a path while preserving its overall shape.