BSplineBasis[d,x]
gives the zeroth uniform B-spline basis function of degree d at x.
BSplineBasis[d,n,x]
gives the n
uniform B-spline basis function of degree d.
BSplineBasis[{d,{u1,u2,…}},n,x]
gives the n
non-uniform B-spline basis function of degree d with knots at positions ui.
BSplineBasis
BSplineBasis[d,x]
gives the zeroth uniform B-spline basis function of degree d at x.
BSplineBasis[d,n,x]
gives the n
uniform B-spline basis function of degree d.
BSplineBasis[{d,{u1,u2,…}},n,x]
gives the n
non-uniform B-spline basis function of degree d with knots at positions ui.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- BSplineBasis[d,x] is equivalent to BSplineBasis[d,0,x].
- BSplineBasis[d,n,x] gives B-spline basis functions that have nonzero values only within the x interval between
and
. - BSplineBasis[{d,{u1,u2,…,um}},n,x] gives B-spline basis functions that have nonzero values only within the x interval between u1 and um.
- The knot positions ui must form a non-decreasing sequence.
- Possible values of n range from 0 to m-d-2.
- PiecewiseExpand can be used to expand symbolic BSplineBasis functions into explicit piecewise polynomials.
Examples
open all close allBasic Examples (4)
Evaluate a uniform cubic B-spline basis numerically:
BSplineBasis[3, 0.5]Plot[BSplineBasis[3, x], {x, 0, 1}]Evaluate the second cubic B-spline basis with given knots:
knots = {0, 0, 0, 0, 1 / 3, 2 / 3, 1, 1, 1, 1};BSplineBasis[{3, knots}, 2, 0.5]Plot all the cubic basis functions with given knots:
Plot[Evaluate[Table[BSplineBasis[{3, knots}, i, x], {i, 0, 5}]], {x, 0, 1}]Symbolic derivative of B-spline basis:
knots = {0, 0, 0, 1 / 3, 2 / 3, 1, 1, 1};D[BSplineBasis[{2, knots}, 2, x], {x, 1}]Table[Plot[Evaluate[D[BSplineBasis[{2, knots}, 2, x], {x, i}]], {x, 0, 1}], {i, 0, 2}]Scope (1)
TraditionalForm formatting:
BSplineBasis[{3, {0, 0, 0, 0, 1 / 3, 2 / 3, 1, 1, 1, 1}}, 1, x]//TraditionalFormInputForm[%]Properties & Relations (3)
The nonzero part of a B-spline basis function is given by the range of knots:
k1 = {0, 0, 0, 0, 1 / 3, 2 / 3, 1, 1, 1, 1};
k2 = 2 k1;
k3 = k1 + 1;Table[Plot[BSplineBasis[{3, k}, 2, x], {x, 0, 2}, PlotRange -> {0, 1}, PlotLabel -> Style[k, Small]], {k, {k1, k2, k3}}]Table[Plot3D[BSplineBasis[{3, k}, 2, x]BSplineBasis[{3, k}, 2, y], {x, 0, 2}, {y, 0, 2}, PlotRange -> {0, 1 / 2}, Mesh -> None, Boxed -> False], {k, {k1, k2, k3}}]The sum of all B-spline bases at points within the support is always one:
knots = {0, 0, 0, 0, 1 / 3, 2 / 3, 1, 1, 1, 1};Plot[Evaluate[Sum[BSplineBasis[{3, knots}, i, x], {i, 0, 5}]], {x, 0, 1}, Axes -> False, Frame -> True]At most, d+1 basis functions contribute to the sum where d is the degree:
Plot[Evaluate[Table[BSplineBasis[{3, knots}, i, x], {i, 0, 5}]], {x, 0, 1}]BSplineBasis can be used to build up BSplineCurve:
knots = {0, 0, 0, 1 / 4, 1 / 2, 3 / 4, 1, 1, 1};pts = {{0, -1}, {1, 1}, {2, -1}, {3, -1}, {4, 1}, {5, -1}};f[t_] := Sum[pts[[i + 1]]BSplineBasis[{2, knots}, i, t], {i, 0, 5}]{ParametricPlot[f[t], {t, 0, 1}, Frame -> True, Axes -> False, PlotRange -> {All, {-1, 1}}], Graphics[BSplineCurve[pts, SplineDegree -> 2], Frame -> True]}Related Guides
-
▪
- Splines
History
Text
Wolfram Research (2008), BSplineBasis, Wolfram Language function, https://reference.wolfram.com/language/ref/BSplineBasis.html.
CMS
Wolfram Language. 2008. "BSplineBasis." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BSplineBasis.html.
APA
Wolfram Language. (2008). BSplineBasis. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BSplineBasis.html
BibTeX
@misc{reference.wolfram_2026_bsplinebasis, author="Wolfram Research", title="{BSplineBasis}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BSplineBasis.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_bsplinebasis, organization={Wolfram Research}, title={BSplineBasis}, year={2008}, url={https://reference.wolfram.com/language/ref/BSplineBasis.html}, note=[Accessed: 13-June-2026]}