fun simplify(points: List<Vector2>, epsilon: Double): List<Vector2>
(source)
The Ramer–Douglas–Peucker algorithm, is an algorithm that decimates a curve composed of line segments to a similar curve with fewer points.
epsilon
- when epsilon is less than the max distance between 2 points, recursively simplify
Author
Edwin Jakobs