Even More B-splines




CS216

Chris Pollett

Feb 23, 2010

Outline

Introduction

Blending Function Properties

Theorem. Let `u_0 \leq u_1 \leq \ldots \leq u_l` be a knot vector. Then the blending functions `N_(i,m)(u)`, for `0\leq i \leq l - m` satisfy the following properties:

  1. `N_(i,m)(u)` has support in `[u_i, u_(i+m)]` for all `m\geq 1`.
  2. `N_(i,m)(u) \geq 0` for all `u`.
  3. `\sum_(i=0)^(l-m)N_(i,m)(u) = 1` for all u such that `u_(m-1) \leq u \leq u_(l-m+1)`.

Proof of Theorem

(1) and (2) are straightforward proofs by induction on `m`. We will show (3) in more detail to illustrate how arguments about B-spline blending functions are carried out. In the base case, the functions `N_(i,1)(u)` are step functions with nonzero values on disjoint intervals. i.e., only one of them is 1 at a time and so the sum of these blending functions is 1. Now let's assume (3) holds for `m` and try to show the `m+1` case. Assume `u_m \leq u \leq u_(l-m)`. By the Cox de Boor formula:
`\sum_(i=0)^(l-m-1) N_(i, m+1)(u)`
`= \sum_(i=0)^(l-m-1)(\frac{u-u_i}{u_(i+m)-u_i}N_(i, m)(u) + \frac{u_(i+m+1) - u}{u_(i+m+1)-u_(i+1)}N_(i+1, m)(u))`
`= \frac{u-u_0}{u_(m)-u_0}N_(0, m)(u) + \sum_(i=1)^(l-m-1)(\frac{(u - u_i) + (u_(i+m)-u)}{u_(i+m)-u_i}N_(i, m)(u)) + \frac{u_l-u}{u_(l)-u_(l-m)}N_(l-m, m)(u)`
`= N_(0, m)(u) +\sum_(i=1)^(l-m-1) 1\cdot N_(i,m)(u) + N_(l-m, m)(u)` since `u_(m-1) \leq u \leq u_(l-m+1)`
`=\sum_(i=0)^(l-m) 1\cdot N_(i,m)(u) = 1.`

Smoothness of B-spline Curves

Now that we've seen the style of argument used to show properties of B-splines. Let's look at some more properties. First, let's consider smoothness...

As a B-spline curve is piecewise a polynomial function of the control points, except possibly at control points it will be `C^\infty`. So what happens at control points? Here is a result we state without proof.

Theorem. Let `\vec q(u)` be a B-spline curve of order `m`, and let the knot `u_i` have multiplicity `\mu`. Then the curve `\vec q(u)` has continuous `(m-\mu-1)`th derivative at `u=u_i`.

B-splines near Knots and Endpoints

The next result can also be proven by induction on `k`, it shows the behavior of a degree `k` blending functions when a knot is repeated at least `k` times. This will be useful when we talk about the de Boor algorithm.

Theorem. Let `k\geq 1`.

  1. Suppose that `u_i=u_(i+k-1) < u_(i+k)`, and so `u_i` has multiplicity at least `k`. Then
    `\lim_(u \rightarrow u_i^+)N_(i-1, k+1)(u) = 1`
    and, for `j \ne i - 1`,
    `\lim_(u \rightarrow u_i^+)N_(j, k+1)(u) = 0`.
  2. Dually, suppose that `u_(i-1) < u_i = u_(i+k -1)`, and so `u_i` has multiplicity at least `k`. Then
    `\lim_(u \rightarrow u_i^-)N_(i-1, k+1)(u) = 1`
    and, for `j \ne i - 1`,
    `\lim_(u \rightarrow u_i^-)N_(j, k+1)(u) = 0`.

Quiz

Which of the following statements is true?

  1. In TCB splines the tension parameter is used to model overshoot.
  2. If a control point changes in a B-spline curve it will always have a global effect on the shape of the curve.
  3. By repeating knots, a B-spline can be used to represent a Bézier curve.

Preliminaries to the de Boor Algorithm

Iterating the Theorem

The de Boor Algorithm Intuition

The de Boor Algorithm


Input: (1)A degree k B-spline curve `\vec q` (order `m=k+1`), given by:
          Control points `\vec p_0, \vec p_1, \ldots, p_n`,
          Knot positions `u_0, u_1, \ldots, u_(n+m)`.
       (2) A value `u` such that `u_k \leq u \leq u_(n+1)`.
Result: Return value is `\vec q(u)`.
Algorithm:
   If (`u == u_(n+1)`) {
      Return `\vec p_n`;
   }
   Set `s` to be the value such that `u_s \leq u < u_(s+1)`;
   If(`u==u_s`) {
     Set `\mu  = \text{ the multiplicity of } u_s`;
   } Else {
     Set `\mu = 0`;
   }
   //Initialize
   For l = 0, 1, ..., `k - \mu` {
     Set r[l] = `\vec p_(s-k+l)`
   }
   //Main loop:
   For j = 1, 2, ..., `k - \mu` {
     For l = 0, 1, ..., k-j {
        Set `\alpha = \frac{u - u_(s-k+j+l)}{u_(s+l+1) - u_(s-k+j+l)}`;
        Set r[l] = lerp(r[l],r[l+1], `\alpha`); // lerp = linear interpolate function
     }
   }
   Return r[0];