is an option for B-spline functions and graphics primitives that specifies whether spline curves or surfaces should be closed.
SplineClosed
is an option for B-spline functions and graphics primitives that specifies whether spline curves or surfaces should be closed.
Details
- For curves, the setting SplineClosed->True makes the first and last points be connected smoothly.
- For higher-dimension surfaces and manifolds, SplineClosed->True makes all boundaries be connected smoothly.
- With the setting SplineClosed->True, all boundaries are connected smoothly.
- With the setting SplineClosed->{c1,c2,…}, the boundaries are connected in directions i for which ci is True.
Examples
open all close allBasic Examples (2)
Generally, a B-spline curve is open and passes through the first and last control points:
pts = {{0, 0}, {0, 1}, {1, 1}, {1, 0}};Graphics[{Point[pts], BSplineCurve[pts]}]Smoothly closed B-spline curve with the same control points:
Graphics[{Point[pts], BSplineCurve[pts, SplineClosed -> True]}]B-spline closed in the
-direction:
Graphics3D[BSplineSurface[{{{0, 0, 0}, {0, 1, 0}, {1, 1, 0}, {1, 0, 0}}, {{0, 0, 1}, {0, 1, 1}, {1, 1, 1}, {1, 0, 1}}}, SplineClosed -> {False, True}]]Scope (1)
B-spline surface closed in both directions:
Graphics3D[{BSplineSurface[{{{1, 0, -.5}, {2, 0, -.5}, {2, 0, .5}, {1, 0, .5}}, {{0, 1, -.5}, {0, 2, -.5}, {0, 2, .5}, {0, 1, .5}}, {{-1, 0, -.5}, {-2, 0, -.5}, {-2, 0, .5}, {-1, 0, .5}}, {{0, -1, -.5}, {0, -2, -.5}, {0, -2, .5}, {0, -1, .5}}}, SplineClosed -> True]}, PlotRange -> 1.5, Axes -> True]Properties & Relations (2)
Construct an open B-spline curve from B-spline basis functions:
pts = {{0, 0}, {0, 1}, {1, 1}, {1, 0}};
basis = Table[BSplineBasis[{3, {0, 0, 0, 0, 1, 1, 1, 1}}, i, x], {i, 0, 3}];
f[x_] := Dot[basis, pts];{ParametricPlot[f[x], {x, 0, 1}, PlotRange -> {0, 1}], Graphics[BSplineCurve[pts], Axes -> True]}The basis functions differ by their indices:
Plot[Evaluate[basis], {x, 0, 1}]Construct a closed B-spline curve from uniform B-spline basis functions:
pts = {{0, 0}, {0, 1}, {1, 1}, {1, 0}};
cbasis = Table[BSplineBasis[3, i, x], {i, 0, 6}];
g[x_] := Dot[cbasis, Join[pts, pts[[1 ;; 3]]]];{ParametricPlot[g[x], {x, 3 / 4, 7 / 4}, PlotRange -> {0, 1}], Graphics[BSplineCurve[pts, SplineClosed -> True], Axes -> True]}The basis functions are periodic. Thus they are of the same shape:
Plot[Evaluate[cbasis], {x, 0, 10 / 4}]Related Guides
-
▪
- Splines
History
Text
Wolfram Research (2008), SplineClosed, Wolfram Language function, https://reference.wolfram.com/language/ref/SplineClosed.html.
CMS
Wolfram Language. 2008. "SplineClosed." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SplineClosed.html.
APA
Wolfram Language. (2008). SplineClosed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SplineClosed.html
BibTeX
@misc{reference.wolfram_2026_splineclosed, author="Wolfram Research", title="{SplineClosed}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/SplineClosed.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_splineclosed, organization={Wolfram Research}, title={SplineClosed}, year={2008}, url={https://reference.wolfram.com/language/ref/SplineClosed.html}, note=[Accessed: 13-June-2026]}