TP9 submission deadline is Thursday, 13/04/2017 at 23:59. The TP on Friday 14/04 will start at 13:30 (instead of 15:15).

TP5 : Lane-Riesenfeld algorithm

10 March 2017 in


Uniform B-splines

In TP3, you have implemented the De Boor’s algorithm for evaluation of general B-splines. Now, let’s have a look at a particular subclass of B-spline curves, characterized by the uniform knot vector $t_i = i \; \; \forall i \in \mathbb Z$; have a look at the basis induced by such vector.

Your today’s task will be to implement these uniform B-splines as subdivision curves.

Lane-Riesenfeld algorithm

For a given degree, the following constitutes one subdivision step of the Lane-Riesenfeld algorithm. From initial polygon $\mathbf P_0, \mathbf P_1, \dots, \mathbf P_{n-1}$ with $n$ vertices, we compute subdivided polygon $\mathbf S_0, \mathbf S_1, \dots, \mathbf S_{2n-1}$ with $2n$ vertices.

Double the points (refining) :

Average multiple times (smoothing) :

($i$-indices are taken modulo $2n$)

Replace :


With increasing degree, the Stanford bunny becomes smoother and smoother. Here, the degree runs from 2 to 20 and back.

Variations on the Lane-Riesenfeld algorithm

Since the introduction of the algorithm by Lane and Riesenfeld in 1980, multiple variations of the original scheme were introduced. We will implement two of them, replacing the midpoint averaging with four-point and six-point averaging. You already know the four-point averaging from the previous TP.

For brevity, I’m only including the modified parts of the original algorithm.

Don’t forget the indices are taken modulo $2n$ in the smoothing step!


In the refining step, vertices are no longer doubled: the new ones are already computed via four-point averaging. Then, we perform additional degree averagings on all vertices.

Refine :

Smooth :


Very similar to the four-point scheme.

Refine :

Smooth :


  1. Implement the three subdivision schemes (for closed polygons). Test with the provided datasets.
  2. Try varying the degree parameter. How do the curves change?
  3. What differences between the three schemes do you observe? In your opinion, which scheme gives better results? Why?
  4. Simplify the original Lane-Riesenfeld scheme for degree=2. What do you observe?