• **the setup**: the user gives a **sparse** set of correspondences — a few control points, or pairs of feature segments — and we must produce a **dense** warp field $f$ defined at every pixel by *interpolating* the sparse constraints. Three standard constructions, trading smoothness, locality, and control:
• **mesh / triangulation warp (piecewise-affine)**: triangulate the control points (e.g. Delaunay); inside each triangle the three vertex correspondences **exactly determine an affine map** (6 DOF, 3 points), so warp each triangle by its own affine. Simple, fast, exact at the controls, and the standard morphing workhorse. Downside: **$C^0$ only** — the field is continuous but **creases** at triangle edges (derivative jumps), and quality depends on the triangulation. [`fig-mesh-triangulation-warp`]
• **RBF / thin-plate-spline (TPS) warp (smooth scattered-data interpolation)**: fit a **smooth** field that interpolates the control displacements with **minimal bending energy**: $f(\mathbf p)=A\mathbf p+\mathbf t+\sum_i w_i\,\phi(\lVert\mathbf p-\mathbf c_i\rVert)$, an affine "global" part plus a sum of **radial basis functions** centred at the controls. The thin-plate kernel $\phi(r)=r^2\log r$ minimizes integrated second-derivative energy — the smoothest interpolant (the physical analogy: a thin metal plate bent to pass through the constraints). The weights $w_i$ (and $A,\mathbf t$) solve a small **linear system**. Smooth everywhere ($C^1$+), no creases; **global support** (every control influences every pixel, so it can be less local than a mesh) and an $O(n^2)$–$O(n^3)$ solve in the number of controls. The go-to for smooth medical/face registration and morphometrics (Bookstein). [`fig-tps-rbf-warp`]
• **feature-based field warping — Beier & Neely 1992**: specify the warp with **pairs of directed line segments** (before/after) rather than points — natural for features like an eyebrow or a jawline. Each segment pair $(\mathbf{PQ}\to\mathbf{P'Q'})$ defines a **local coordinate frame**: a coordinate $u$ **along** the segment (normalized, $0$ at $\mathbf P$, $1$ at $\mathbf Q$) and $v$ **perpendicular** (in distance units). For a single segment, map a point by reading its $(u,v)$ in the **destination** segment's frame (inverse warp) and reconstructing it in the source frame:
• $u=\dfrac{(\mathbf X-\mathbf P)\cdot(\mathbf Q-\mathbf P)}{\lVert\mathbf Q-\mathbf P\rVert^2}$, $\quad v=\dfrac{(\mathbf X-\mathbf P)\cdot\perp(\mathbf Q-\mathbf P)}{\lVert\mathbf Q-\mathbf P\rVert}$; then $\mathbf X'=\mathbf P'+u\,(\mathbf Q'-\mathbf P')+\dfrac{v\,\perp(\mathbf Q'-\mathbf P')}{\lVert\mathbf Q'-\mathbf P'\rVert}$.
• **note** (Beier–Neely's own finding): $u$ scales with the segment (stretch), but $v$ is kept **absolute** — they tried scaling $v$ too and it looked worse.
• **multiple segments**: each segment $i$ proposes a displaced point $\mathbf X'_i$; the result is a **distance-weighted average**, weight $w_i=\big(\ell_i^{\,p}/(a+d_i)\big)^{b}$ — longer segments ($\ell_i$) carry more influence, nearer ones ($d_i$ = distance to the segment) dominate; $a,b,p$ tune the falloff. [`fig-beier-neely-segments`]
• **provenance / use**: the technique behind Michael Jackson's *Black or White* morph; a classic course problem set. *Built here, used in [[Morphing]].* (Ref: Beier & Neely 1992; the canonical warping text is Wolberg 1990.)
• **as-rigid-as-possible (ARAP) / MLS warps — penalize shear**: the catch with the above is that interpolating positions alone lets shapes **shear and squash** unnaturally when you drag a handle. **As-rigid-as-possible** (Igarashi 2005) and **moving-least-squares** rigid/similarity deformation (Schaefer 2006) add an explicit objective: each local neighbourhood should transform **as close to a rotation+translation (rigid) as possible** — minimize the deviation from rigidity rather than just matching control points. The deformation then **preserves local shape** (a dragged limb bends but doesn't stretch), which is what makes interactive shape manipulation and detail-preserving warps look natural. Conceptually: same "dense field from sparse handles," but with a **regularizer on local rigidity** instead of plain smoothness. [`fig-arap-vs-affine`]
• **choosing** (decision aid): a **plane / camera rotation / lens model** → parametric (affine/homography), fit by least squares. A **face/shape morph** with creases acceptable and speed wanted → **mesh/triangulation**. A **smooth** registration with few controls → **TPS/RBF**. **Feature-line** control (eyebrows, jaw) → **Beier–Neely**. **Interactive handle-dragging** where shapes must not shear → **ARAP/MLS**. Whatever the choice, the *application* is identical: produce $f$, then **inverse-warp and resample** (the first three sections) — that primitive never changes.