If we have 2n+2 knots u_{0} = u_{1} = ... = u_{n} = 0 and u_{n+1} = u_{n+2} = ... = u_{2n+1} = 1 (i.e., the first n+1 being 0 and the next n+1 being 1), what are the B-spline basis functions of degree n?
Since every u is in [0,1] = [u_{n}, u_{n+1}], the non-zero basis functions of degree n are: N_{0,n}(u), N_{1,n}(u), ..., N_{n,n}(u). Recall the definition of B-spline basis functions as follows:
Since the only non-zero basis function of degree 0 is N_{n,0}(u), the index i can only be in the range of 0 and n. Therefore, the u_{i}'s are zero and u_{i+n}'s and u_{i+n+1}'s are 1. Consequently, the second equation above can be rewritten as follows:
If we organize the computation of N_{0,n}(u), N_{1,n}(u), ..., N_{n,n}(u) in a triangular form as discussed on the previous page, we have the following diagram. In this diagram, each north-east (resp., south-east) bound arrow means multiplying 1-u (resp., u) to the term at the tail of the arrow. Note that there are n stages in the computation, one for obtaining each column. Therefore, the contribution of N_{n,0}(u) to N_{0,n}(u) is (1-u)^{n}, and the contribution of N_{n,0}(u) to N_{n,n}(u) is u^{n}.
Now, consider the computation of a general term N_{i,n}(u). The contribution of N_{n,0}(u) to the computation of N_{i,n}(u) can be determined by the "path-counting" technique that was used to show the correctness of de Casteljau's algorithm and in the computation of higher derivatives of a Bézier curve. Each path going from N_{n,0}(u) to N_{i,n}(u) encounters n arrows of which i are south-east bound and n-i are north-east bound. Those north-east (resp., south-east) bound arrows mean multiply the term at the tail by 1-u (resp., u). Therefore, the contribution of N_{n,0}(u) to N_{i,n}(u) along a single path is u^{i}(1-u)^{n-i}. The total number of paths from N_{n,0}(u) to N_{i,n}(u) is C(n,i). More precisely, the number of paths is equal to the number of different ways of placing i south-east bound arrows in n positions. The remaining n-i positions are filled with north-east bound arrows. This n arrows precisely describe a single path from N_{n,0}(u) to N_{i,n}(u). Since each path contributes u^{i}(1-u)^{n-i} to the computation and since there are C(n,i) paths, the total contribution of N_{n,0}(u) to N_{i,n}(u) is
This is exactly the i-th Bézier basis function of degree n. Therefore, we have the following conclusion:
If the first (resp., last) n+1 knots are equal to 0 (resp., 1), then the i-th B-spline basis function of degree n is identical to the i-th Bézier basis function for all i in the range of 0 and n. Hence, the Bézier basis functions are special cases of B-spline basis functions, and Bézier curves are special cases of B-spline curves. |