How to deduce the recursive derivative formula of B-spline basis?

3k Views Asked by At

Description

Let $\vec{U}=\{u_0,u_1,\ldots,u_m\}$ denotes a non-decreasing sequence of real numbers, i.e, $u_i\leq u_{i+1} \quad i=0,1,2\ldots m-1$.

and the $i$-th B-spline basis function of $p$-degree, denoted by $N_{i,p}(u)$, is defined as below:

$$ N_{i,0}(u)= \begin{cases} 1 & u_i\leq u<u_{i+1}\\ 0 & otherwise \end{cases} $$ $$ N_{i,p}(u)= \frac{u-u_i}{u_{i+p}-u_i}N_{i,p-1}(u)+\frac{u_{i+p+1}-u}{u_{i+p+1}-u_{i+1}}N_{i+1,p-1}(u) $$

By reading the textbook The NURBS Book, I can know the following recursive formula about the derivetive of $N_{i,p}(u)$.

$$ \frac{d}{du}N_{i,p}(u)=p\left[ \frac{N_{i,p-1}(u)}{u_{i+p}-u_i}-\frac{N_{i+1,p-1}(u)}{u_{i+p+1}-u_{i+1}} \right] \qquad (1) $$

In addition, I can also understand the verification process by mathematical induction that the author given in the textbook pp.59-60. Namely,

(1) Varifying the correctness of this recursive formula for $p=1$;

(2) Assuming this formula is right for $p=k$, then proved that this formula is also right for $p=k+1$ with help of the assumption.

However, I would like to know where this formula came from. The author just given the conclusion and proved it by mathematical induction.

QUESTION

  • How to deduce the derivative formmula of the B-spline basis function $N_{i,p}(u)$?

  • Although the author has given a related reference The Computation of all the Derivatives of a B-spline Basis in the bibliography, I cannot download that paper by the libriary of our university. In addition, the reference just for another recursive formula(please see Eq.(2)), not for Eq.(1).

$$ N_{i,p}^{(k)}=\frac{p}{p-k}\left(\frac{u-u_i}{u_{i+p}-u_i}N_{i,p-1}^{(k)}+\frac{u_{i+p+1}-u}{u_{i+p+1}-u_{i+1}}N_{i,p-1}^{(k)}\right) \quad (2) $$

where $k=0,1,\cdots,p-1$

Lastly, I discovered that Eq.(1) was useful than Eq.(2), and it was implemented in Wolfram Mathematica. For instance,

knots = {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1};
D[BSplineBasis[{3, knots}, 2, x], x]
(*9/2 BSplineBasis[{2, {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1}}, 2, x] - 
    3 BSplineBasis[{2, {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1}}, 3, x]*)
D[BSplineBasis[{3, knots}, 2, x], {x, 2}]
(*9/2 (6 BSplineBasis[{1, {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1}}, 2, x] - 
       3 BSplineBasis[{1, {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1}}, 3, x]) - 
  3 (3 BSplineBasis[{1, {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1}}, 3, x] - 
     3 BSplineBasis[{1, {0, 0, 0, 0, 1/3, 2/3, 1, 1, 1, 1}}, 4, x])*)

Thanks a lot! :)

1

There are 1 best solutions below

1
On

B-spline basis functions are just piecewise polynomials, of course. This implies that the derivative $g$ of a b-spline basis function $f$ of degree $p$ is a piecewise polynomial of degree $p-1$ with the same break-points between segments. So, $g$ can be written as a some linear combination of b-spline basis functions of degree $p-1$. The only remaining problem is to figure out what the coefficients are in this linear combination, which then gives you the formulae you cited. Once you have done this, you can "prove" the formula as if by magic, just by confirming that it’s correct. As you observed, this is a case where verifying a formula gives you no hint about where it came from, or even why such a formula should exist.

Another approach is to work first with Bézier curves, which are a special case of b-splines. In this case, it's easy to write down explicit formulas for the basis functions (they are just Bernstein polynomials), so the algebra is simpler. You can easily derive formulas for derivatives of Bézier curves, and this suggests that similar formulae might exist in the more general b-spline case, too.