Curve simplification example