Bilinear Interpolation Calculator

Estimate function values using 2D bilinear interpolation on rectangular grids

Calculate Bilinear Interpolation

Rectangle Corner Coordinates

Rectangle corners: (x₁,y₁), (x₁,y₂), (x₂,y₁), (x₂,y₂)

Function Values at Corner Points

Known function values at the four corner points

Interpolation Point

Point (x,y) where you want to estimate the function value

Interpolation Results

4.000000
Interpolated Value P
f(1, 2) ≈ 4.000000
Function estimate at point

Detailed Calculation

Formula: P = w₁₁×Q₁₁ + w₂₁×Q₂₁ + w₁₂×Q₁₂ + w₂₂×Q₂₂

Area of rectangle: (x₂-x₁)×(y₂-y₁) = 8

Weights:

  • w₁₁ = (x₂-x)×(y₂-y) / area = 0.3750
  • w₂₁ = (x-x₁)×(y₂-y) / area = 0.1250
  • w₁₂ = (x₂-x)×(y-y₁) / area = 0.3750
  • w₂₂ = (x-x₁)×(y-y₁) / area = 0.1250

Weighted terms:

  • 0.3750 × 12 = 4.5000
  • 0.1250 × 0 = 0.0000
  • 0.3750 × -4 = -1.5000
  • 0.1250 × 8 = 1.0000

Result: P = 4.5000 + 0.0000 + -1.5000 + 1.0000 = 4.000000

Step-by-Step Linear Interpolations

Step 1: Linear interpolation at y = y₁ = 1

R₁ = f(1, 1) = 9.000000

Step 2: Linear interpolation at y = y₂ = 3

R₂ = f(1, 3) = -1.000000

Step 3: Final interpolation between R₁ and R₂

P = f(1, 2) = 4.000000

Example Calculation

Temperature Distribution Example

Given: Temperature readings at four corners of a room

Corner (0,1): 12°C

Corner (0,3): -4°C

Corner (4,1): 0°C

Corner (4,3): 8°C

Find: Temperature at point (1,2)

Solution

Area = (4-0) × (3-1) = 8

w₁₁ = (4-1)×(3-2)/8 = 3/8

w₂₁ = (1-0)×(3-2)/8 = 1/8

w₁₂ = (4-1)×(2-1)/8 = 3/8

w₂₂ = (1-0)×(2-1)/8 = 1/8

P = (3/8)×12 + (1/8)×0 + (3/8)×(-4) + (1/8)×8

P = 4.5 + 0 - 1.5 + 1 = 4°C

Formula Reference

Bilinear Interpolation

P = w₁₁Q₁₁ + w₂₁Q₂₁ + w₁₂Q₁₂ + w₂₂Q₂₂

Weights:

w₁₁ = (x₂-x)(y₂-y)/A

w₂₁ = (x-x₁)(y₂-y)/A

w₁₂ = (x₂-x)(y-y₁)/A

w₂₂ = (x-x₁)(y-y₁)/A

A: Rectangle area = (x₂-x₁)(y₂-y₁)

Requirements

• x₁ < x₂ and y₁ < y₂

• x₁ ≤ x ≤ x₂ and y₁ ≤ y ≤ y₂

• Four function values at corners

Key Concepts

📊

Used for 2D interpolation on rectangular grids

⚖️

Weighted average based on distance to corners

🔗

Linear in each direction, quadratic overall

🎯

Common in image processing and computer graphics

Understanding Bilinear Interpolation

What is Bilinear Interpolation?

Bilinear interpolation is a method for estimating function values at any point within a rectangle, given the function values at the four corners. It performs linear interpolation first in one direction, then in the perpendicular direction.

How It Works

  1. Perform linear interpolation along the bottom edge (y₁)
  2. Perform linear interpolation along the top edge (y₂)
  3. Interpolate between these two results vertically

Applications

  • Image processing: Resizing and rotating images
  • Computer graphics: Texture mapping and rendering
  • Numerical analysis: Solving PDEs on grids
  • Geographic mapping: Interpolating elevation data

Key Properties

  • • Exact at corner points
  • • Linear along edges
  • • Continuous across boundaries
  • • Computationally efficient