{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $k \\ge 1$ be an order, let $t_1 \\le t_2 \\le \\cdots \\le t_{n+k}$ be a knot vector with $t_k \u003c t_{n+1}$, and let $B_{1,k}, \\dots, B_{n,k}$ be the [[B-splines|62AFX32JGT]] of order $k$ for these knots.\nLet $P_1, \\dots, P_n \\in \\R^d$ be control points and let $w_1, \\dots, w_n \u003e 0$ be weights.\nThe *NURBS curve* with these data is the map $C \\colon [t_k, t_{n+1}] \\to \\R^d$,\n$$C(u) = \\frac{\\sum_{i=1}^{n} w_i\\, B_{i,k}(u)\\, P_i}{\\sum_{i=1}^{n} w_i\\, B_{i,k}(u)}.$$\nA *NURBS surface* is defined in the same way with tensor products $B_{i,k}(u) B_{j,l}(v)$, control points $P_{ij}$ and positive weights $w_{ij}$.\n\n## Remarks\n\nThe denominator is positive on $[t_k, t_{n+1})$, because the B-splines are nonnegative and do not all vanish there; so $C(u)$ is a convex combination of the control points.\nAt $u = t_{n+1}$, where the right-continuous B-splines may all vanish, $C$ is defined by its limit from the left, as usual.\nIn [[homogeneous coordinates|FS9FRJ17D2]], $C$ is the central projection of the polynomial B-spline curve with control points $(w_i P_i, w_i)$ in $\\R^{d+1}$.\nIf all weights are equal, $C$ is the ordinary B-spline curve $\\sum_i B_{i,k}(u) P_i$.\nExample: take $k = 3$, knots $0, 0, 0, 1, 1, 1$, points $(1, 0)$, $(1, 1)$, $(0, 1)$ and weights $1$, $1/\\sqrt{2}$, $1$.\nThen $C$ is a rational quadratic [[Bézier curve|NEXBTGYYRG]], and $C(1/2) = (1/\\sqrt{2}, 1/\\sqrt{2})$.\nIn fact $C$ traces the quarter of the unit circle in the first quadrant.\nNon-example: the same data with weight $w_2 = -1$ fail the positivity clause, and then the denominator $(1-u)^2 - 2u(1-u) + u^2 = (2u - 1)^2$ vanishes at $u = 1/2$, so $C$ is not defined on all of $[0, 1]$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "Y8B2N9ERPE",
    "kind": "definition",
    "msc": [
      "65D17",
      "68U07",
      "41A15"
    ],
    "name": "Non-uniform rational B-spline",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline"
      }
    ],
    "tag": "9TBVX1RHDB",
    "uses": [
      "62AFX32JGT",
      "NEXBTGYYRG",
      "FS9FRJ17D2"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/9TBVX1RHDB/",
  "links": [
    {
      "field": "defines",
      "target": "Y8B2N9ERPE"
    },
    {
      "field": "uses",
      "target": "62AFX32JGT"
    },
    {
      "field": "uses",
      "target": "NEXBTGYYRG"
    },
    {
      "field": "uses",
      "target": "FS9FRJ17D2"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/9TBVX1RHDB.md",
  "msc": [
    "65D17",
    "68U07",
    "41A15"
  ],
  "name": "Non-uniform rational B-spline",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/9TB/9TBVX1RHDB.md",
  "status": null,
  "tag": "9TBVX1RHDB",
  "uri": "m2://9TBVX1RHDB",
  "url": "https://tamnd.github.io/math2/wiki/non-uniform-rational-b-spline-definition/",
  "writing": {
    "tag": "9TBVX1RHDB",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
