Extending cubic splines interpolation into n input variables. Is it possible?

545 Views Asked by At

I have the equation for cubic spline interpolation, and I can see how it works for a data set in the 2d Cartesian coordinates. I was wondering if there is a general form to the equation that allows for interpolation for n input variables. For example where each data "point" includes (x1, x2, x3,...,xn, y).

For a 2d case, where there is one input, and one output, ie. a regular point (x, y) in the Cartesian coordinate system, cubic splines create a line. Would that be the case for a 3d problem (x1, x2, y)? Where instead of a line this would create a surface of some kind, given enough points? How about in the more general case, where there are n-dimensions?

Any help directing me towards keywords to search or general equations would be very helpful.

I'm not even sure if this kind of reasoning is right. But any course correction is much appreciated!

2

There are 2 best solutions below

0
On

Cubic Bezier splines, for instance, parametrize a curve starting at one point, ending at another and with initial and final vectors pointing towards the other two control points. There is nothing in the parametrization that depends on the dimensionality of the space the points come from. In any space, the resulting object is a curve.

If you are interested in surfaces as well, you might like to read about NURBS.

0
On

The simplest splines are mappings $t \mapsto c(t)$ from $\mathbb{R} \to \mathbb{R}$. So, you input a number $t$ and you get back another number $c(t)$.

The first way to generalize is to use two of these functions, say $t \mapsto x(t)$ and $t \mapsto y(t)$. Then, given a number $t$, you get the point $\big(x(t),y(t)\big) \in \mathbb{R}^2$. So, the mapping $t \mapsto \big(x(t),y(t)\big)$ defines a parametric curve in $\mathbb{R}^2$.

The next extension is fairly obvious. If you have three spline functions, $t \mapsto x(t)$, $t \mapsto y(t)$, and $t \mapsto z(t)$, then $t \mapsto \big(x(t),y(t), z(t)\big)$ is a parametric curve in $\mathbb{R}^3$.

Continuing in the same way, you can get spline curves in any $\mathbb{R}^n$.

A different way to generalize is to make the function domain more complex. The most common examples are spline functions that map $\mathbb{R}^2$ (or some rectangular region of $\mathbb{R}^2$) into $\mathbb{R}^3$. These are 3D parametric surfaces. Bézier patches are a simple example.

Going one step further, there are spline functions that map $\mathbb{R}^3$ (or some box-shaped region of $\mathbb{R}^3$) into $\mathbb{R}^3$. These represent 3D parametric deformed "bricks", which have some uses, in stress analysis, for example.

Of course, you can keep generalizing further, in fairly obvious ways, but the special cases I have described are the ones that are most commonly used in practice (in the fields where I work, anyway).

Nothing that I wrote is intimately connected with splines. You could replace the word "spline" by "polynomial", or "trigonometric function", for example, and everything I described would still work.