Linear Interpolation
📐 Definition
Section titled “📐 Definition”For (or vectors) and ,
Domain and Codomain
Section titled “Domain and Codomain”Applies to scalars or vectors in a common linear space. Output lies on the affine segment between and for .
⚙️ Key Properties
Section titled “⚙️ Key Properties”Linear in each argument; satisfies , . For uniform grids, piecewise lerp yields first-order accurate interpolation.
Extrapolation occurs for . Symmetry: .
🎯 Special Cases and Limits
Section titled “🎯 Special Cases and Limits”- yields convex combinations; outside this range extrapolates.
- Symmetry: swapping endpoints corresponds to .
🔗 Related Functions
Section titled “🔗 Related Functions”Clamping bounds ; normalization can be applied before or after blending.
Usage in Oakfield
Section titled “Usage in Oakfield”Oakfield uses linear blending in a few internal “glue” paths:
- Warp limited continuity blends nearby valid samples (effectively a simple linear average) when a warp gradient is undefined at the probe point.
- UI/runtime parameter flows often apply explicit
a + t(b-a)style blending when smoothing or staging parameter updates (even when not calling a dedicated lerp helper). - Math helpers in
core/math_utils.hprovidesim_lerp_double/sim_lerp_complexfor kernels that want a standard lerp.
Historical Foundations
Section titled “Historical Foundations”📜 Affine Combinations
Section titled “📜 Affine Combinations”Linear interpolation is the simplest affine blending operation and a building block for piecewise-linear approximation on grids.
🌍 Modern Perspective
Section titled “🌍 Modern Perspective”It is a ubiquitous primitive in numerical methods, geometry, and graphics for blending and sampling.
📚 References
Section titled “📚 References”- Quarteroni, Sacco, Saleri, Numerical Mathematics