Back to Tools

Bilinear Interpolation

Visualize how pixel values are interpolated from four corner integer coordinates. The surface creates a hyperbolic paraboloid connecting the four values in 3D space.

Coordinates

Delta X (dx)0.50
Delta Y (dy)0.50
Interpolated Value
3.750

Corner Values (Z)

Modify the height (pixel value) of each corner to see how the surface adapts.

Formula

ξ=x\xi = \lfloor x \rfloorη=y\eta = \lfloor y \rfloor
Δx=xξ\Delta x = x - \xiΔy=yη\Delta y = y - \eta
I(x,y)I(x, y) \approx
I(ξ,η)(1Δx)(1Δy)+I(\xi, \eta)(1 - \Delta x)(1 - \Delta y) +
I(ξ+1,η)Δx(1Δy)+I(\xi + 1, \eta)\Delta x(1 - \Delta y) +
I(ξ,η+1)(1Δx)Δy+I(\xi, \eta + 1)(1 - \Delta x)\Delta y +
I(ξ+1,η+1)ΔxΔyI(\xi + 1, \eta + 1)\Delta x \Delta y
Loading 3D Visualization...
Click & Drag to Rotate • Scroll to Zoom

Key Concepts

  • 2D Extension: Bilinear interpolation extends linear interpolation to a 2D grid. It performs linear interpolation first in one direction (e.g., X), and then interpolates those results in the other direction (Y).
  • Weighted Average: The estimated value I(x,y)I(x, y) is a weighted average of the four nearest integer neighbors, where the weights are determined by the fractional distances Δx\Delta x and Δy\Delta y.
  • Hyperbolic Paraboloid: Unlike a flat plane, the resulting surface is curved (a hyperbolic paraboloid). This ensures that the surface passes smoothly through all four corner points, even if they are not coplanar.