I need to simplify a huge amount of data before drawing them on the screen.
I found Ramer–Douglas–Peucker algorithm on Wikipedia. But here\'s a problem: it has quadratic