I have a vector drawing app where users can draw lines using multiple quadratic bezier curves. A curve, for example, could have 5 points - points 0-2 for a quadratic bezier curve, and points 2-4 form another. If the slope @ the end of the first bezier curve doesn't equal the slope at the beginning of the 2nd bezier curve, the curve isn't smooth.
I want to include a "smooth" button, which users can click to smooth the lines automatically. I want to keep the overall MSE between original and smoothed curves small, as opposed to making the slopes match perfectly. However, 100% accuracy isn't necessary as it's a drawing program - speed is more important. Are there any good algorithms that can do this? I can't seem to find any references for this.