CS184 Lecture 23 summary

Subdivision methods

Last time we considered B-splines which use piecewise-polynomial blending functions which are tailored to the interpolation task, providing locality and low polynomial degree. This time, we describe a simple computational scheme for generating B-splines without generating an explicit basis at all. The method is called subdivision. Not only can it be used to generate B-splines, but a slight change to it will produce fractals and wavelets, which are non-smooth curves.

Uniform Subdivision

We start with a function f0(u), with values defined on an integer knot vector (0,1,2,...,n). The function is assumed to be linear between the knot-point values. Subdivision consists of two steps:

  1. Compute midpoints of the line segments
  2. Apply an averaging filter to the original points plus midpoints

That produces 2n-1 values for a new function f1(u), and it is assumed to be piecewise linear in between these values. We can apply the algorithm again to f1(u) to produce a new function with 4n-1 values f2(u). By iterating the scheme we get a series of functions fk(u). In the limit, there is a function foo(u). For a suitable choice of the averaging filter, the final function turns out to be a B-spline defined by the original points.

The simplest example of subdivision is Chaikin's algorithm. The averaging mask is 1/2(1,1), which is just the midpoint of the two neighboring points. Chaikin's algorithm produces a quadratic B-spline in the limit. Whiteboard example...

Lets examine this process in more detail. First, some definitions. The kth function is denoted fk(u). It is defined on a vector of knot values which are of the form

i/2k

with i ranging from 0 to 2kn. So e.g. the zeroth function is defined on the integer knot vector 0,...,n.

We will use cjk to denote the value of fk(u) at the jth knot point, i.e.

cjk = fk( j/2k )

And so (c00,..., cn0) is the vector of the original control points.

Computing Midpoints

We will use the variable d to represent the function values and midpoint values at some step of the algorithm. We define

djk+1 = cj/2k    if j is even

djk+1 = 1/2( c(j-1)/2k   + c(j+1)/2k )  if j is odd

So djk+1 for j even is just knot-point values of fk(u), while djk+1 for j odd are the midpoints between them.

Averaging Step

At the averaging step we compute the next level of c values from the d values.

cjk+1   =   S ri dj+ik+1

where r = (r0,...,rm) is the averaging mask. For Chaikin's algorithm, m=1, and the mask is 1/2(1,1). It gives rise to quadratic B-splines in the limit.

The next most complex mask is 1/4(1,2,1). When subdivision is applied with this mask, it gives rise to a cubic B-spline in the limit.