Exercise set 6: Rational Bézier and NURBS curves

1. Consider a rational Bézier curve (Subscript[c, 1]) with weight vector {2,1,1,2,7,7/2,1} and the following control points:
{{-3, -1}, {-2, -3/2}, {-1, -4/3}, {0, -1/2}, {1, 1/2}, {1/2, 7/6}, {-1/2, 2}}.
1.1 Plot both the curve in space and its projection onto plane.
1.2 Change the weight vector and repeat 1.1 with the new curve (use the same control points).

2. Consider the following control points: {{0,1}, {1,1}, {1,0}}.
2.1 Plot a quarter of a circle (Subscript[c, 2]) using a rational Bézier curve with these control points.
2.2 Reparametrize the curve (Subscript[c, 2]) so that (Subscript[c, 2])((1/2)) = {(3/5), (4/5)}.
2.3 Reparametrize the curve (Subscript[c, 2]) so that the weight of the second control point is (Sqrt[2]).

3. Write a function for the rational DeCasteljau algorithm.
3.1 Use the algorithm to compute (Subscript[c, 1])((1/2)).
3.2 Use the algorithm to compute the tangent to (Subscript[c, 2]) at the point (1/2).

4. Use a NURBS curve of degree 2 to inscribe a circle into equilateral triangle.

5. Bonus: Interpolate the data (Subscript[P, 1]) = {0,0}, (Subscript[t, 1]) = {1,2}, (Subscript[P, 2]) = {1,1}, (Subscript[t, 2]) = {2,-3} using the biarc method (see the slides about interpolations).