is an option for B-spline functions and graphics primitives that specifies weights of control points.
SplineWeights
is an option for B-spline functions and graphics primitives that specifies weights of control points.
Details
- SplineWeights->Automatic makes all weights equal, yielding polynomial splines.
- With SplineWeights->array, each element of array gives the weight for the corresponding control point in the array of control points specified.
Examples
open all close allBasic Examples (1)
pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {4, -2}, {5, 1}};Graphics[{Point[pts], BSplineCurve[pts, SplineWeights -> Automatic]}]This uses a larger weight for the third control point:
Graphics[{Point[pts], BSplineCurve[pts, SplineWeights -> {1, 1, 10, 1, 1, 1}]}]Applications (2)
Perfect circle using B-spline curve with weights:
pts = {{.5, 0}, {1, 0}, {1, 1}, {.5, 1}, {0, 1}, {0, 0}, {.5, 0}};
w = {1, .5, .5, 1, .5, .5, 1};
k = {0, 0, 0, 1 / 4, 1 / 2, 1 / 2, 3 / 4, 1, 1, 1};Graphics[BSplineCurve[pts, SplineWeights -> w, SplineKnots -> k]]Pipe section using B-spline surface with weights:
pts = {{{0.5, 0, -0.5}, {0, 0, -0.5}, {0, 1, -0.5}, {0.5, 1, -0.5}, {1, 1, -0.5}, {1, 0, -0.5}, {0.5, 0, -0.5}},
{{0.5, 0, 0.7}, {0, 0, 0.7}, {0, 1, 0.7}, {0.5, 1, 0.7}, {1, 1, 0.7}, {1, 0, 0.7}, {0.5, 0, 0.7}},
{{0.5, 0, 0.9}, {0, 0, 0.9}, {0, 1, 1.5}, {0.5, 1, 1.5}, {1, 1, 1.5}, {1, 0, 0.9}, {0.5, 0, 0.9}},
{{0.5, -0.1, 1}, {0, -0.1, 1}, {0, 0.5, 2}, {0.5, 0.5, 2}, {1, 0.5, 2}, {1, -0.1, 1}, {0.5, -0.1, 1}},
{{0.5, -0.3, 1}, {0, -0.3, 1}, {0, -0.3, 2}, {0.5, -0.3, 2}, {1, -0.3, 2}, {1, -0.3, 1}, {0.5, -0.3, 1}},
{{0.5, -1.5, 1}, {0, -1.5, 1}, {0, -1.5, 2}, {0.5, -1.5, 2}, {1, -1.5, 2}, {1, -1.5, 1}, {0.5, -1.5, 1}}};w = {{1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5, 1}};
uk = {0, 0, 0, 1 / 4, 1 / 2, 3 / 4, 1, 1, 1};
vk = {0, 0, 0, 1 / 4, 1 / 2, 1 / 2, 3 / 4, 1, 1, 1};Graphics3D[{
FaceForm[Yellow, Blue],
BSplineSurface[pts, SplineKnots -> {uk, vk}, SplineDegree -> 2, SplineWeights -> w, SplineClosed -> {False, True}]}, ViewPoint -> {Right, Front}]See Also
BSplineCurve BSplineSurface BSplineFunction SplineDegree SplineKnots
Function Repository: FullBSplineCurve
Related Guides
-
▪
- Splines
History
Text
Wolfram Research (2008), SplineWeights, Wolfram Language function, https://reference.wolfram.com/language/ref/SplineWeights.html.
CMS
Wolfram Language. 2008. "SplineWeights." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SplineWeights.html.
APA
Wolfram Language. (2008). SplineWeights. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SplineWeights.html
BibTeX
@misc{reference.wolfram_2026_splineweights, author="Wolfram Research", title="{SplineWeights}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/SplineWeights.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_splineweights, organization={Wolfram Research}, title={SplineWeights}, year={2008}, url={https://reference.wolfram.com/language/ref/SplineWeights.html}, note=[Accessed: 13-June-2026]}