{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $U = [0, 1]^2$, and for each corner $c \\in \\set{0, 1}^2$ let real numbers $f(c)$, $f_x(c)$, $f_y(c)$ and $f_{xy}(c)$ be given.\nThe *bicubic interpolant* on $U$ is the unique polynomial\n$$p(x, y) = \\sum_{i=0}^{3} \\sum_{j=0}^{3} a_{ij} x^i y^j$$\nsuch that, at each corner $c$, $p = f(c)$, $\\partial_x p = f_x(c)$, $\\partial_y p = f_y(c)$ and $\\partial_x \\partial_y p = f_{xy}(c)$.\nOn a rectangular grid, *bicubic interpolation* applies this on each cell after an affine change of variables to $U$.\nThe derivative data are scaled by the cell sides.\n\n## Remarks\n\nThe sixteen conditions determine the sixteen coefficients.\nIndeed, $p$ is the tensor product of one-dimensional [[cubic Hermite interpolation|HCQWPAHYAT]] in $x$ and in $y$, so it exists and is unique.\nExample: for $f(x, y) = x^3 y^3$, the data are $f = f_x = f_y = 0$ at every corner except $(1, 1)$, where $f = 1$, $f_x = f_y = 3$ and $f_{xy} = 9$; the interpolant is $x^3 y^3$, since it has the required form.\nNon-example: the function $\\sin(\\pi x) \\sin(\\pi y)$ has zero value at all corners, but it is not a polynomial of the required form, so it is not a bicubic interpolant of any data.\nOn a grid, along a shared edge the value and the normal derivative are cubics determined by data at the two common corners only.\nSo adjacent patches join with continuous value and first derivatives.\nThe variant used for images replaces the derivatives by differences of neighboring pixel values, or uses a cubic convolution kernel on a $4 \\times 4$ neighborhood.\n\n## Explanations\n\n### L1 human\n\nOn each square of the grid, bicubic interpolation fits a polynomial that is cubic in $x$ and cubic in $y$.\nIt matches the value, the slopes and the twist at the four corners, sixteen numbers in all, and this makes the whole surface smooth across cell edges.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "P1G0M3S8QV",
    "kind": "definition",
    "msc": [
      "65D05",
      "65D07",
      "41A05"
    ],
    "name": "Bicubic interpolation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Bicubic_interpolation"
      }
    ],
    "tag": "Q8DWXQ2WG0",
    "uses": [
      "SS1YMS2NPC",
      "HCQWPAHYAT",
      "5QJYCNRYMQ"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/Q8DWXQ2WG0/",
  "links": [
    {
      "field": "defines",
      "target": "P1G0M3S8QV"
    },
    {
      "field": "uses",
      "target": "SS1YMS2NPC"
    },
    {
      "field": "uses",
      "target": "HCQWPAHYAT"
    },
    {
      "field": "uses",
      "target": "5QJYCNRYMQ"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/Q8DWXQ2WG0.md",
  "msc": [
    "65D05",
    "65D07",
    "41A05"
  ],
  "name": "Bicubic interpolation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/Q8D/Q8DWXQ2WG0.md",
  "status": null,
  "tag": "Q8DWXQ2WG0",
  "uri": "m2://Q8DWXQ2WG0",
  "url": "https://tamnd.github.io/math2/wiki/bicubic-interpolation-definition/",
  "writing": {
    "tag": "Q8DWXQ2WG0",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
