curve flattenings