Monday, 2020 March 30, 10:35 — curve-fitting

Scribbles: The Ensmoothening, Part III

Many of the curves in this chart have some unsightly wiggles. That’s because, when a function of degree 2 or higher tries to approximate a piecewise constant, it tends to go back and forth across the target. So here instead I fitted each such function not to the piecewise constant directly but to the fit of the next lower degree.

So some accuracy in fit is lost – but this was useful practice for an application in which, perhaps oddly, that doesn’t matter.

Column 0 is the target. Column 1 is made of circle segments with G1 continuity, and some of the joins are easy to see. Column 2 is quadratic spirals with G2 continuity, and the improvement is clear. It’s much harder to find differences between G2, G3, G4; that may be partly due to the limitations of the cubic splines that imitate these transcendental curves.

This was also incidentally the first serious test of my piecewise polynomial object’s new integration method!

Subscribe without commenting

RSS feed for comments on this post.

Leave a comment