Is there a cubic spline interpolation method for curves in $\mathbb R^2$

101 Views Asked by At

We know that given sample points, $(x_i, f(x_i)),\ i=0,\cdots,n$, where $a=x_0<x_1<\cdots<x_n=b$, we can do a cubic spline interpolation to find a $C^2$ function on $[a,b]$ that is piecewise a cubic polynomial in each interval $[x_{i+1},x_i]$.

I wonder if we can extend this to curves in $\mathbb R^2$. Say, we have a smooth curve $C$ in $\mathbb R^2$. If we are given sample points $(x_i,y_i),\ i=0,\cdots,n$ on $C$, is it possible to find a piecewise "cubic" curve to interpolate $C$?

The reason I used quotes for "cubic" above is that there are possibly more than one way to define what is "cubic" for a curve. I can think of three ways:

  • Think of $y$ as a function of $x$, and do the usual interpolation. But this may not be suitable for curves.
  • Try to interpolation using $x(t)=At^3+Bt^2+Ct+D,\ x(t)=A't^3+B't^2+C't+D'$. But this has too many parameters. Also, the possible reparametrizations of $t$ is also a problem. I guess we can put some additional constrains such as $(x'(t))^2+(y'(t))^2=1$. But I am not sure this is suitable.

So is there currently any such effort?

1

There are 1 best solutions below

0
On

A smooth curve C in $R^2$ might have multiple $y$ values given the same $x$, so it is not suitable to use the explicit representation $y=f(x)$. Typically, parametric representation $C(t)=(x(t),y(t))$ is used.

You can easily extend the cubic spline interpolation to interpolate a set of points $(x_i, y_i)$ as long as you know the order of these points. Knowing the order of these points will allow you to assign parameter to each point, a process known as "parametrization". Chord-length parametrization and centripetal parametrization are two typical methods. Once you know the $t$ value for each point, the cubic spline interpolation for $(x_i, y_i)$ will be essentially the same as doing it twice: one for $(t_i, x_i)$ and another for $(t_i, y_i)$.

You can also extend this to interpolate a set of 3d points $(x_i, y_i, z_i)$ sampled from a 3d curve $C(t)=(x(t),y(t), z(t))$.