4
$\begingroup$

Description

Let $\vec{U}=\{u_0,u_1,\ldots,u_m\}$ denote 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) $$

From reading the textbook The NURBS Book, I know the following recursive formula about the derivative 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 gives in the textbook pp.59-60. Namely,

(1) Verifying 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 gives the conclusion and proved it by mathematical induction.

QUESTION

  • How to deduce the derivative formula 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 through the library of our university. In addition, the reference is 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 more 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])*)
$\endgroup$
1

1 Answer 1

2
+100
$\begingroup$

You can express the vector $\mathcal{N}_{i,p} = (N_{i-p,p}(x), \ldots, N_{i,p}(x))$ as a product of certain matrices $R_1\cdots R_p$, where enter image description here

(here $\mu =i$ and $t_j = u_j$)

These matrices have a very neat property: $R_k(x)' R_{k+1}(x) = R_k(x) R_{k+1}(x)'$ which allows you to simplify the result of the Leibniz rule $$ \frac{d}{dx} \mathcal{N}_{i,p} = \sum_{k=1}^p R_1(x)\cdots R_{k-1}(x) R_k(x)' R_{k+1}(x)\cdots R_p(x) $$ which gives you $$ \frac{d}{dx} \mathcal{N}_{i,p} (x) = p \mathcal{N}_{i,p-1} (x) R_d'(x). $$ Then you just calculate the derivative of the matrix $R_d$ and compare left hand side with the right hand side.

You can find all details here and here (pdf links).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .