A C implementation of the Ramer-Douglas-Peucker path simplification algorithm
Check out the Wikipedia article for a description of the algorithm.
Note that currently this implementation behaves as if the light blue bar extends infinitely in either direction.