{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$ be an [[affine space|09XNAPTJQ7]] of dimension $n$ over a field $k$.\nLet $p_0, \\dots, p_n$ be [[affinely independent|JWK49HMHYT]] points of $A$.\nFor every point $x$ of $A$ there is a unique tuple $(\\lambda_0, \\dots, \\lambda_n) \\in k^{n+1}$ such that\n$$\\lambda_0 + \\cdots + \\lambda_n = 1 \\quad \\text{and} \\quad x = \\lambda_0 p_0 + \\cdots + \\lambda_n p_n,$$\nwhere the right side is the [[affine combination|0KJH6SRFZK]] $p_0 + \\sum_{i=1}^{n} \\lambda_i (p_i - p_0)$.\nThe numbers $\\lambda_0, \\dots, \\lambda_n$ are the *barycentric coordinates* of $x$ with respect to $p_0, \\dots, p_n$.\n\n## Remarks\n\nExample: in $\\R^2$ take $p_0 = (0, 0)$, $p_1 = (1, 0)$ and $p_2 = (0, 1)$.\nThe point $(x, y)$ has barycentric coordinates $(1 - x - y, x, y)$.\nCheck: the weights add up to $1$, and $(1 - x - y)(0, 0) + x(1, 0) + y(0, 1) = (x, y)$.\nThe centroid $(1/3, 1/3)$ gets the coordinates $(1/3, 1/3, 1/3)$.\n\nNon-example: the points $(0, 0)$, $(1, 0)$, $(2, 0)$ of $\\R^2$ are collinear, so they are not affinely independent.\nFor them the coordinates are not unique, and the point $(0, 1)$ has none at all.\n\nWhen $k$ is $\\R$, a point lies in the closed simplex with vertices $p_0, \\dots, p_n$ exactly when all its barycentric coordinates are nonnegative.\nHomogeneous barycentric coordinates drop the condition $\\sum \\lambda_i = 1$: any tuple with nonzero sum is accepted, and two tuples that differ by a nonzero factor give the same point.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "G0XVRV6QT5",
    "kind": "definition",
    "msc": [
      "51N10",
      "51A05"
    ],
    "name": "Barycentric coordinates",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Barycentric_coordinate_system"
      }
    ],
    "tag": "KHEPP95FF9",
    "uses": [
      "09XNAPTJQ7",
      "0KJH6SRFZK",
      "JWK49HMHYT"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/KHEPP95FF9/",
  "links": [
    {
      "field": "defines",
      "target": "G0XVRV6QT5"
    },
    {
      "field": "uses",
      "target": "09XNAPTJQ7"
    },
    {
      "field": "uses",
      "target": "0KJH6SRFZK"
    },
    {
      "field": "uses",
      "target": "JWK49HMHYT"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/KHEPP95FF9.md",
  "msc": [
    "51N10",
    "51A05"
  ],
  "name": "Barycentric coordinates",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/KHE/KHEPP95FF9.md",
  "status": null,
  "tag": "KHEPP95FF9",
  "uri": "m2://KHEPP95FF9",
  "url": "https://tamnd.github.io/math2/wiki/barycentric-coordinates-definition/",
  "writing": {
    "tag": "KHEPP95FF9",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
