这篇可能帮我们更好的理解B-spline。
The equation for
k-order B-spline with
n+1 control points
(P0 , P1 , ... , Pn ) is
P(t) = ∑i=0,n Ni,k(t) Pi , tk-1 <= t <= tn+1 .
In a B-spline each control point is associated with a basis function
Ni,k which is given by the recurrence relations (see
Bspline.java)
Ni,k(t) = Ni,k-1(t) (t - ti)/(ti+k-1 - ti) + Ni+1,k-1(t) (ti+k - t)/(ti+k - ti+1) ,
Ni,1 = {1 if ti <= t <= ti+1 , 0 otherwise } Ni,k is a polynomial of order
k (degree
k-1) on each interval
ti < t < ti+1.
k must be at least 2 (linear) and can be not more, than
n+1 (the number of control points). A knot vector
(t0 , t1 , ... , tn+k) must be specified. Across the knots basis functions are
C k-2 continuous.
Corresponding iterations scheme for cubic (
k = 4) basis functions is shown in Fig.1 . You see, that for a given
t value only
k basis functions are non zero, therefore B-spline depends on
k nearest control points at any point
t.
B-spline basis functions as like as Bezier ones are nonnegative Ni,k >= 0 and have "partition of unity" property
∑i=0,n Ni,k(t) = 1, tk-1 < t < tn+1
therefore
0 <= Ni,k <= 1.
As since Ni,k = 0 for t <= ti or t >= ti+k therefore a control point Pi influences the curve only for ti < t < ti+k.