Exercise set 8: Subdivision

1. Write a function for Chaikin’s subdivision scheme, that produces open curves.
1.1 Apply several iterations on the polygon {{0,0},{2,0},{3,3},{-1,4},{0,1}}. (Don’t forget to plot the polygons.)
1.2 Modify the function so it produces closed curves. Try it again on the same polygon.
1.3 Try to increase the number of iterations until the polygon “looks” smooth.

2. Write a function for the Four-point subdivision scheme for closed curves.
2.1 Apply several iterations on the polygon {{0,0},{2,0},{3,3},{-1,4}}.
2.2 Try to increase the number of iterations until the polygon “looks” smooth.

3. Let n(t) denote the 0th B-Spline basis function of degree 2, defined by a knot vector {0,1,2,3}.
(Reminder: You can use the built-in BSplineBasis[] function.)
3.1 Plot the refined basis functions n(2t-i) for i = 0, 1, 2, 3 into one picture.
3.2 Verify by computation that the expression (from the lecture) of n(t) in terms of the refined basis holds.
3.3 Try the same process with the knot vector {0,1/2,1,3}.

4. Bonus: Write the function for the Lane-Riesenfeld algorithm, that also takes the degree d as an input besides the polygon.
4.1 Try several iterations for d=3 on the polygon {{0,0},{2,0},{3,3},{-1,4},{0,1}}.
4.2 Try several iterations for d=2 on the same polygon.
4.3 Try several iterations for d=1 on the same polygon.