Last modified: May 24, 2025

This article is written in: 🇺🇸

Thin Plate Spline Interpolation

Thin Plate Spline (TPS) interpolation is a non‑parametric, spline‑based technique for fitting a smooth surface through scattered data in two or more spatial dimensions. In its classical 2‑D form one seeks a function f:R2R that passes through specified data points while minimising the thin‑plate bending energy—the amount a thin metal sheet would bend if it were pinned at those points. The construction extends naturally to higher dimensions and higher‑order splines.

While polynomials or other radial‑basis interpolants can achieve the same pointwise accuracy, TPS is unique in that it yields the minimum possible bending energy among all twice‑differentiable functions matching the data, so the fitted surface stays as flat (i.e. as smooth) as the constraints allow. This makes TPS a staple in image warping, geometric modelling, and shape deformation tasks.

Conceptual Illustration

Imagine you have a set of control points (xi,yi,zi) in 3D space, where (xi,yi) represent spatial coordinates and zi is the function value at that location. Thin plate spline interpolation finds a surface z=f(x,y) that exactly passes through all these points. If you imagine the surface as a thin metal sheet pinned at these points, the TPS solution is the shape the sheet would naturally take if it were free to bend but not stretch, minimizing the total bending energy:

output

The resulting surface is smooth, continuous in its derivatives, and tends to flatten out smoothly between data points.

Mathematical Formulation

Given a set of N data points (xi,yi,zi)i=1N, where no two points coincide, we want to find a function:

f(x,y)=α0+α1x+α2y+i=1Nwiϕ((x,y)(xi,yi))

that interpolates the given data. Here:

ϕ(r)=r2ln(r)

which is the fundamental solution associated with the thin plate spline bending energy in 2D.

This f(x,y) must satisfy the interpolation conditions:

f(xi,yi)=zi,i=1,,N.

Additionally, to ensure a unique solution and remove degeneracies, f(x,y) must satisfy:

i=1Nwi=i=1Nwixi=i=1Nwiyi=0

This leads to a linear system for the unknown parameters α0,α1,α2,w1,,wN

Derivation

I. Energy Minimization:

Thin plate splines arise from minimizing a bending energy functional:

J[f]=(2fx2)2+2(2fxy)2+(2fy2)2dxdy, subject to the interpolation constraints f(xi,yi)=zi.

II. Variational Problem:

Solving the Euler-Lagrange equations associated with the energy minimization under the interpolation conditions yields the form of the TPS. The solution can be shown to be a polynomial of degree at most 1 plus a weighted sum of radial basis functions ϕ(r)=r2ln(r).

III. Linear System:

Substitute f(x,y) into the interpolation conditions. This produces a system of N+3 linear equations (for wi,α0,α1,α2):

[0P PK][α w]=[0 z]

where:

Solving this system yields the TPS coefficients.

Algorithm (matrix form)

I. Kernel matrix

KRN×N,Kij=ϕ!(xixj2).

II. Polynomial matrix

P=[1x1y11xNyN]RN×3.

III. Augmented linear system

[KP PT03×3]AR(N+3)×(N+3)[w α]=[z 0],z=(z1,,zN)T

IV. Solve the linear system once. Complexity is O(N3) with dense K.

V. Evaluate at any (x,y). Cost per evaluation is O(N).

Numerical stability tip Because ϕ(r)r2lnr is unbounded at infinity, centre and (optionally) scale the xi to unit box if N is large or the domain is wide.

Fully-worked example (four points)

I. Data

(0,0,0),(1,0,1),(0,1,1),(1,1,2)(N=4)

II. Kernel matrix K

Distances rij=xixj2

1234hline10112210213120142110

Compute ϕ(r)=r2lnr:

Thus

K=[0000.69314718000.69314718000.69314718000.69314718000]

III. Polynomial matrix P

P=[100110101111]

IV. Augmented system

A=[KP P!T03×3],b=[0 1 1 2 0 0 0]

Explicitly,

A=[000ln2100 00ln20110 0ln200101 ln2000111 1111000 0101000 0011000]

V. Solution

Solving

A[w α]=b

gives

w=[0 0 0 0]

α=[a0 a1 a2]=[0 1 1]

Interpretation: the four data points lie exactly on the plane

f(x,y)=x+y,

so the bending-energy minimiser needs no non-linear kernel part (w=0).

Remarks and extensions

TopicNotes
Singular casesIf the data are exactly coplanar and you add any numerical noise, K may become rank-deficient. Add a small diagonal regulariser λI in K if needed.
ComplexitySolve once in O(N3); thereafter evaluations are O(N). For N2000 use fast methods (partition of unity, K-D trees, or the O(N) fast-TPS of Beatson & Light).
Higher dimensionsIn d-D the “thin-plate” energy changes and ϕ(r) becomes r2lnr only for d=2. In d=3 one has ϕ(r)=r.
Derivative continuityThe TPS interpolant is C1 and its second derivatives are square-integrable; ideal for smoothly warping images or terrain surfaces.

Advantages

Limitations

Table of Contents

    Thin Plate Spline Interpolation
    1. Conceptual Illustration
    2. Mathematical Formulation
    3. Derivation
    4. Algorithm (matrix form)
    5. Fully-worked example (four points)
    6. Remarks and extensions
    7. Advantages
    8. Limitations