1

I am currently coding up a project where interpolations must be performed such that C2 continuity be preserved along the length of the whole set. The end result ought to look like a line (which will curve around in any direction) embedded in higher dimensional space. In other words: I have a set of experimentally determined points, P(w,x,y,z), which I'd like to connect via this C2 continuous line.

How do I apply a natural cubic spline to this line? The boundary conditions can be determined by using a C1 approach (Centripetal Catmull Rom, for instance). Is there a source I can consult for this? All the websources I've found restrict themselves to the useless f(x) case, and I have no idea how to set up the tridiagonal matrix for the n-dimensional case.

Thanks you!

EmilioW
  • 11

1 Answers1

1

Sounds like you understand how to create "$y=f(x)$" splines. So, now apply this technique to construct four functions $x=f_1(t)$, $y=f_2(t)$, $z=f_3(t)$, $w=f_4(t)$. Before doing this, you need to assign a parameter value $t_i$ to each data point $\mathbf{P}_i = (x_i, y_i, z_i, w_i)$.

A typical approach involves solving a linear system of equations (like the tridiagonal system you mentioned). In this system, the coefficient matrix will be the same in all four cases ($x,y,z$ and $w$), which gives you some opportunities for improved speed/efficiency, if this is important to you.

You might benefit from reading this answer.

bubba
  • 44,617