Ramer–Douglas–Peucker algorithm (source code)

= Ramer–Douglas–Peucker algorithm
{wiki=Ramer–Douglas–Peucker_algorithm}

The Ramer–Douglas–Peucker (RDP) algorithm, also known simply as the Douglas-Peucker algorithm, is a widely used technique in computational geometry for reducing the number of points in a curve that is approximated by a series of points. The primary purpose of this algorithm is to simplify the representation of a curve while preserving its overall shape and structure.