What is the importance and effect of the smoothness of a spline?

318 Views Asked by At

A Catmull-Rom spline is a $C^1$ (but not $C^2$) function, that is, its first derivative is continuous (but its second derivative might not be). However, there are splines that have $C^2$ or, in general, $C^k$ continuity.

In practice, for the purpose of interpolation, what is the difference between a $C^1$ spline (like the Catmull-Rom spline) as opposed to a $C^2$ spline? Why is the smoothness really important? How does it affect the modeling or interpolation? So, how do I determine if I need a $C^1$ or $C^2$ or, in general, $C^k$ spline as opposed to any other spline?

2

There are 2 best solutions below

11
On

I'll give an example: Recently, I had a pointset $\{x_i, y_i\}$ which came from discretization of second order ODE $y'' + p(x)y' + q(x)y = f$. Then I wanted a continuous representation of the pointset, so I created a spline interpolant $s$ out of it. Now what is the error of the interpolant? You compute $$ \left\| s'' + ps' + qs - f\right\| $$

Ok, so I needed at least a $C^{2}$ spline, otherwise I can't compute $s''$. Turns out, this was bad, because if I only used a $C^2$ spline, I just had line segments between interpolation points, and those line segments said my error was worse than it really was. So I used a quintic spline, whose second derivative is a cubic spline, which gave me a really nice approximation of $s''$ to $u''$.

So that's an example! There are a million reasons why you'd choose differing level of smoothness in practice.

2
On

Whether to use a $C^1$ or a $C^2$ spline for your interpolation really depends on how you will use that interpolated spline in your application.

For example, if your interpolated spline is an approximation to a $C^2$ continuous function, naturally you will use a $C^2$ spline to interpolate.

In the area of geometric modeling, surfaces are often constructed from curves using technique such as lofting or sweeping. Having a $C^2$ continuous curve is the minimum requirement to achieve a $C^2$ continuous surface, which will have better aesthetic appearance than a surface that is just $C^1$ continuous.

Please note that to achieve a $C^2$ continuous spline interpolation, you do not need to use quintic splines. Cubic splines (e.g. a cubic B-spline curve) can still be $C^2$ continuous.