WOLFRAM NOTEBOOK

B-Spline Curve with Knots

degree
1
2
3
4
5
control polygon
knots on curve
view
curve
basis functions
control points
knot control
t
3
0.25
t
4
0.5
t
5
0.75
This Demonstration illustrates the relation between B-spline curves and their knot vectors. Start with the control points
p
0
,
p
1
,...,
p
n
p
i
k
and a knot vector
{
t
0,
t
1
,...,
t
m
}
, where the degree of the B-spline is
p=m-n-1
. The knot vector satisfies
t
i
[0,1]
and
t
i
t
i+1
. The B-spline basis functions are defined as:
N
i,0
(t)=
1
t
i
t<
t
i-1
0
otherwise
N
i,p
(t)=
t-
t
i
t
i+p
-
t
i
N
i,p-1
(t)+
t
i+p+1
-t
t
i+p+1
-
t
i+1
N
i+1,p-1
(t)
,
and a B-spline curve is defined as:
C(t)=
n
i=0
p
i
N
i,p
(t)
.
For nonperiodic B-splines, the first
p+1
knots are equal to 0 and the last
p+1
knots are equal to 1. If
k
duplication happens at the other knots, the curve becomes
p-k
times differentiable. So, by overlapping the knots, you can generate a curve with sharp turns or even discontinuities.
When the number of control points is
p-1
, the basis functions are reduced to Bernstein polynomial, thus the curve becomes a Bézier curve.

Details

Red points indicate the knot points
C(
t
i
)
on the curve. Hold down the Alt key and click to add new control points (up to 12). Changes in degree and number of control points will cause the knot vector to be recomputed.
Choose "view basis functions" to show the B-spline basis functions of a given knot vector instead of the B-spline curve.

External Links

Permanent Citation

Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.