Homework 2 (until 12.12.)

1. Consider a Bézier curve (Subscript[c, 1]) given by the following control points:
{1, 6}, {-5, 3}, {-6, 0}, {-8, -5}, {-5, -7}, {1, -6}, {5, 3}, {8, -7}.
1.1 Plot the Bernstein basis of the correct degree for curve (Subscript[c, 1]). Plot the curve (Subscript[c, 1]) with its control polygon.
1.2 Find the point (Subscript[c, 1])((14/17)) using the DeCasteljau algorithm. Rotate the curve by ((2π)/5) around this point.
1.3 Divide the curve (Subscript[c, 1]) into two Bézier curves of the same degree at point (Subscript[t, 0])=(1/3). Plot both new curves and their control polygons in one picture.
1.4 Apply the Degree elevation algorithm to the curve (Subscript[c, 1]). Plot both the new curve and (Subscript[c, 1]) with their control polygons.

2. Consider the function f(t)=(t/3)sin((t^2)), t ∈ [0, 2π].
2.1 Divide the interval [0, 2π] into n = 2, 3, ..., 10 subintervals. Compute the (C^1) Hermite interpolation for each interval.
2.2 For each interpolation compute the corresponding interpolation error by sampling.
2.3 Plot the function and the interpolations.

3. Consider a parametric curve (Subscript[c, 2])={sin(t)(t^3)+1,5((cos(2t+2))^3)} for t ∈ [-1, 2].
3.1 Sample 6 points on the curve (Subscript[c, 2]) and interpolate them by a polynomial curve of degree 5 using Lagrange interpolation. Plot the sampled points and the interpolation.
3.2 Sample 20 points on the curve (Subscript[c, 2]) and approximate the curve by a polynomial curve of degree 5 using the least square method. Plot the original curve and its approximation.