<p>If we look at the two terms with only x or only y they fully describe what happens when you go right or up from the starting point.</p>

<p>The xy-terms does not come into play at all.</p>

<p>When you want to go "into the square" or along the upper or the right edge then the xy-term comes into play. It cancels out the x/y-terms and introduce the P11-value that it should obtain in upper-right.</p>

<p>No full explanation here, just nudging along towards insight!</p>

CC BY-SA 3.0
2018-04-21T20:36:06.580Z
2018-04-21T21:01:05.637Z
2018-04-21T21:01:05.637Z
anders
<p>An answer was provided to me via twitter by two people independently.</p>

<ol>
<li><a href="https://twitter.com/nothings/status/987797966789341184" rel="nofollow noreferrer">https://twitter.com/nothings/status/987797966789341184</a></li>
<li><a href="https://twitter.com/DarrenMoo/status/987796950274764802" rel="nofollow noreferrer">https://twitter.com/DarrenMoo/status/987796950274764802</a></li>
</ol>

<p>The intuition is that without the xy term, that equation describes a plane defined by the 3 points involved (all points except $P_{11}$).</p>

<p>The xy term is there to correct it to be a bilinear surface, which is defined additionally by the point $P_{11}$.</p>

CC BY-SA 3.0
2018-04-21T23:27:06.573Z
See also: http://reedbeta.com/blog/quadrilateral-interpolation-part-2/#inversion  The last term can be thought of as the delta of P11 from where it would be if the equation were planar.
Nathan Reed
CC BY-SA 3.0
2018-04-22T13:07:09.067Z
I believe I've seen it named "twist" or "twist vector" in some articles, if that's any help.  It is indeed what allows curvature in what would otherwise be a parallelogram.
Olivier
CC BY-SA 3.0
2018-04-21T21:47:55.373Z
2018-04-21T21:47:55.373Z
Alan Wolfe
<p>Bilinear interpolation can be achieved by interpolating two values across the x axis, and then interpolating between the results across the y axis, like in the image below (from <a href="https://blog.demofox.org/2015/04/30/bilinear-filtering-bilinear-interpolation/" rel="nofollow noreferrer">https://blog.demofox.org/2015/04/30/bilinear-filtering-bilinear-interpolation/</a>)</p>

<p><a href="https://i.sstatic.net/lTXtu.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lTXtu.png" alt="enter image description here"></a></p>

<p>A way to write this mathematically is like this:</p>

<p>$x,y,P_{xy} \in \mathbb{R}$</p>

<p>$x,y \in [0,1]$</p>

<p>$z = (P_{00}(1-x) + P_{10}x)(1-y) + (P_{01}(1-x)+P_{11}x)y$</p>

<p>Doing some algebra, you can get it into a polynomial form:</p>

<p>$z = (P_{00}-P_{10}-P_{01}+P_{11})xy + (P_{10}-P_{00})x + (P_{01}-P_{00})y + P_{00}$</p>

<p>I'm trying to find the (geometric?) intuition for this form of bilinear interpolation but the first term doesn't make much sense to me.</p>

<p>The second term makes some sense because it's saying "add in the difference across the x axis, multiplied by how far you are down the x axis".  The third term is the same, but for the y axis.</p>

<p>The last term is just adding the value at the "starting coordinate" that everything else adds to, so that makes sense as well.</p>

<p>I can't figure out how that first term fits in though, or what exactly it's calculating.  it is the only term that deals with the $P_{11}$ so it is obviously doesn't something meaningful, but I can't quite figure out what it is.</p>

<p>Can anyone explain bilinear interpolation from this point of view?</p>

<p>Note: $P_{00}$ is (0,0), $P_{01}$ is (0,1), $P_{10}$ is (1,0) and $P_{11}$ is (1,1).</p>

<mathematics><interpolation>
Geometric interpretation of this bilinear interpolation equation?
Alan Wolfe
# Geometric interpretation of this bilinear interpolation equation?

(Asked by: username_0 on 2018-04-21)

Bilinear interpolation can be achieved by interpolating two values across the x axis, and then interpolating between the results across the y axis, like in the image below (from <https://blog.demofox.org/2015/04/30/bilinear-filtering-bilinear-interpolation/>)

[![enter image description here](https://i.sstatic.net/lTXtu.png)](https://i.sstatic.net/lTXtu.png)

A way to write this mathematically is like this:

$x,y,P\_{xy} \in \mathbb{R}$

$x,y \in [0,1]$

$z = (P\_{00}(1-x) + P\_{10}x)(1-y) + (P\_{01}(1-x)+P\_{11}x)y$

Doing some algebra, you can get it into a polynomial form:

$z = (P\_{00}-P\_{10}-P\_{01}+P\_{11})xy + (P\_{10}-P\_{00})x + (P\_{01}-P\_{00})y + P\_{00}$

I'm trying to find the (geometric?) intuition for this form of bilinear interpolation but the first term doesn't make much sense to me.

The second term makes some sense because it's saying "add in the difference across the x axis, multiplied by how far you are down the x axis". The third term is the same, but for the y axis.

The last term is just adding the value at the "starting coordinate" that everything else adds to, so that makes sense as well.

I can't figure out how that first term fits in though, or what exactly it's calculating. it is the only term that deals with the $P\_{11}$ so it is obviously doesn't something meaningful, but I can't quite figure out what it is.

Can anyone explain bilinear interpolation from this point of view?

Note: $P\_{00}$ is (0,0), $P\_{01}$ is (0,1), $P\_{10}$ is (1,0) and $P\_{11}$ is (1,1).

**Tags:** mathematics, interpolation


---

## 2 answers

### Answer by username_1 on 2018-04-21. Score: 2

If we look at the two terms with only x or only y they fully describe what happens when you go right or up from the starting point.

The xy-terms does not come into play at all.

When you want to go "into the square" or along the upper or the right edge then the xy-term comes into play. It cancels out the x/y-terms and introduce the P11-value that it should obtain in upper-right.

No full explanation here, just nudging along towards insight!


---

### Answer by username_0 on 2018-04-21. Score: 1

An answer was provided to me via twitter by two people independently.

1. <https://twitter.com/nothings/status/987797966789341184>
2. <https://twitter.com/DarrenMoo/status/987796950274764802>

The intuition is that without the xy term, that equation describes a plane defined by the 3 points involved (all points except $P\_{11}$).

The xy term is there to correct it to be a bilinear surface, which is defined additionally by the point $P\_{11}$.

> **Comments:**
> **username_2**: See also: http://reedbeta.com/blog/quadrilateral-interpolation-part-2/#inversion  The last term can be thought of as the delta of P11 from where it would be if the equation were planar.  
> **username_3**: I believe I've seen it named "twist" or "twist vector" in some articles, if that's any help.  It is indeed what allows curvature in what would otherwise be a parallelogram.  

---

