Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Non-uniform rational B-spline
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Construction of the basis functions === The B-spline basis functions used in the construction of NURBS curves are usually denoted as <math>N_{i,n}(u)</math>, in which <math>i</math> corresponds to the <math>i</math>-th control point, and <math>n</math> corresponds with the degree of the basis function.<ref name=nurbs-book>{{cite book |last1=Piegl |first1=Les |last2=Tiller |first2=Wayne |title=The NURBS Book |date=1997 |publisher=Springer |location=Berlin |isbn=3-540-61545-8 |edition=2. |url-access=registration |url=https://archive.org/details/nurbsbook00pieg }}</ref> The parameter dependence is frequently left out, so we can write {{nowrap|<math> N_{i,n} </math>.}} The definition of these basis functions is recursive in <math>n</math>. The degree-0 functions <math>N_{i,0}</math> are [[piecewise]] [[constant function]]s. They are one on the corresponding knot span and zero everywhere else. Effectively, <math>N_{i,n}</math> is a linear interpolation of <math>N_{i,n-1}</math> and <math>N_{i+1,n-1}</math>. The latter two functions are non-zero for <math>n</math> knot spans, overlapping for <math>n-1</math> knot spans. The function <math>N_{i,n}</math> is computed as [[File:nurbsbasisconstruct.svg|thumb|From top to bottom: Linear basis functions <math>N_{1,1}</math> (blue) and <math>N_{2,1}</math> (green) (top), their weight functions <math>f</math> and <math>g</math> (middle) and the resulting quadratic basis function (bottom). The knots are 0, 1, 2, and 2.5]] <math display="block">N_{i,n} = f_{i,n} N_{i,n-1} + g_{i+1,n} N_{i+1,n-1}</math> <math>f_i</math> rises linearly from zero to one on the interval where <math>N_{i,n-1}</math> is non-zero, while <math>g_{i+1}</math> falls from one to zero on the interval where <math>N_{i+1,n-1}</math> is non-zero. As mentioned before, <math>N_{i,1}</math> is a triangular function, nonzero over two knot spans rising from zero to one on the first, and falling to zero on the second knot span. Higher order basis functions are non-zero over corresponding more knot spans and have correspondingly higher degree. If <math>u</math> is the parameter, and <math>k_i</math> is the <math>i</math><sup>th</sup> knot, we can write the functions <math>f</math> and <math>g</math> as <math display="block">f_{i,n}(u) = \frac{u - k_i}{k_{i+n} - k_i}</math> and <math display="block">g_{i,n}(u) = 1 - f_{i,n}(u) = \frac{k_{i+n} - u}{k_{i+n} - k_i}</math> The functions <math>f</math> and <math>g</math> are positive when the corresponding lower order basis functions are non-zero. By [[mathematical induction|induction]] on n it follows that the basis functions are non-negative for all values of <math>n</math> and <math>u</math>. This makes the computation of the basis functions numerically stable. Again by induction, it can be proved that the sum of the basis functions for a particular value of the parameter is unity. This is known as the '''partition of unity''' property of the basis functions. [[File:nurbsbasislin2.svg|frame|Linear basis functions]] [[File:nurbsbasisquad2.svg|frame|Quadratic basis functions]] The figures show the linear and the quadratic basis functions for the knots {..., 0, 1, 2, 3, 4, 4.1, 5.1, 6.1, 7.1, ...} One knot span is considerably shorter than the others. On that knot span, the peak in the quadratic basis function is more distinct, reaching almost one. Conversely, the adjoining basis functions fall to zero more quickly. In the geometrical interpretation, this means that the curve approaches the corresponding control point closely. In case of a double knot, the length of the knot span becomes zero and the peak reaches one exactly. The basis function is no longer differentiable at that point. The curve will have a sharp corner if the neighbour control points are not collinear.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)