Exercise set 3: Bézier Curves
Do not use the built-in functions for Bernstein bases or Bézier curves.

1. Consider the Bernstein basis of degree 6.
1.1 Plot the basis functions in one image.
1.2 Sum the values of basis functions at the point (π/4).
1.3 Verify by computation that some of the relations from the lecture hold, e. g. symmetry, recurrence, derivative, ...

2. Consider a Bézier curve c with control points {1, 2}, {1, 0}, {0, -1}, {-(3/2), -(1/2)}, {-2, (3/2)}, {(7/4), (7/2)}.
2.1 Plot the curve together with its control polygon.
2.2 Compute the control points of the derivative (hodograph) of c. Plot the hodograph.
2.3 Compute the signed curvature of c. Plot an osculating circle at the point c((2/5)).
2.4 Rotate the curve by (π/3) about the point {-1, (1/2)}.
2.5 Rotate the control points and define new curve (Subscript[c, 2]) with this new control polygon. Compare (Subscript[c, 2]) to the result of previous exercise.

3. (De Casteljau algorithm) Write a function that for a given Bézier curve c and a parameter (Subscript[t, 0]) finds the corresponding point c((Subscript[t, 0])).
3.1 Try the algorithm on the curve from exercise 2 for values (Subscript[t, 0])=(1/5), (Subscript[t, 0])=(2/3), (Subscript[t, 0])=(π/5). Verify that you got the correct value by computing c((Subscript[t, 0])) directly.

4. (Subdivision) Write a function that for a given Bézier curve c and a parameter (Subscript[t, 0]) divides the curve c at the point c((Subscript[t, 0])) into two curves of the same degree as original.
4.1 Try the algorithm on the curve from exercise 2 at the point (Subscript[t, 0])=(π/5). Plot both new curves with their control polygons into one picture.

5. (Degree elevation) Write a function that for a given Bézier curve c of degree n returns a curve with the same image but of degree n+1.
5.1 Try the algorithm on the curve from exercise 2. Plot the curves (both the old one and the new one) and their control polygons into one picture.