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