A bilinear function is built from two variables, using only their product, each variable separately, and a constant: P(x, y) = a₁xy + a₂x + a₃y + a₄. Each coordinate of a bilinear transformation has its own expression. Although it generalizes rotation, translation, and scale, it is not a linear transformation and does not correspond to matrix multiplication. section 4.2.4 section 8.1.1
In two-dimensional geometry, bilinear functions support several useful operations:
- Map the four corners of a rectangle or square; those four point correspondences determine the transformation across the whole space. section 8.1.1
- Create curved, concave images from straight-edged shapes while preserving every straight line. section 4.2.4
- Interpolate a value on a rectangular grid by performing linear interpolation in one direction, then interpolating the resulting interpolants in the other. section 8.1.2
Interpolating a rectangular grid
Given values z₁₁, z₁₂, z₂₁, and z₂₂ at (0, 0), (0, 1), (1, 0), and (1, 1), first calculate z₁(y) = (1 − y)z₁₁ + yz₁₂ and z₂(y) = (1 − y)z₂₁ + yz₂₂. Then calculate z(x, y) = (1 − x)z₁(y) + xz₂(y). The result is a bilinear interpolant over the square. section 8.1.2
See how a bilinear transformation turns a standard square into a curvy concave object. section 4.2.4
