2nd Homework

Consider a Bezier curve (Subscript[c, 1]) given by the following control points:

pts={{1,6},{-5,3},{-6,0},{-8,-5},{-5,-7},{1,-6},{5,3},{8,-7}};

and a parametric curve (Subscript[c, 2]), t ∈ (-1,2)

c2 = {Sin[t]*t^3+1,5*Cos[2*t+2]^3};

ParametricPlot[c2,{t,-1,2},AspectRatio->Automatic,AxesOrigin->{0,0}]

1. Verify by computation, that for a Bernstein Basis of degree n it holds ((Subscript[B, i])^n)(t) = (1-t) ((Subscript[B, i])^(n-1))(t) + t ((Subscript[B, i-1])^(n-1))(t).

2. Find the point (Subscript[c, 1])((14/17)) using DeCasteljau algorithm. Rotate the curve (Subscript[c, 1]) by ((2π)/5) around this point.

3. Write the function that divides a Bezier curve c into two curves of the same degree at a point c(t). Try it out for (Subscript[c, 1]) and t = (1/3). Plot the curve (Subscript[c, 1]), both new curves and their control polygons.

4. Write the Degree Elevation function, apply it to the curve (Subscript[c, 1]). Plot both curves and their control polygons.

5. Sample 6 points on the curve (Subscript[c, 2]) and interpolate the points by a polynomial curve of degree 5. Plot the result.

6. Sample 50 points (Subscript[c, 1])((Subscript[t, i])) on the curve (Subscript[c, 1]) for (Subscript[t, 1]), (Subscript[t, 2]), ..., (Subscript[t, 50]) ∈ [0,1] and approximate the curve using these points by a polynomial curve of degree 4. Plot the result.

7. Divide the function (2/3)sin((t^2)) , t∈ (0,2π) to N subintervals (for general N) and compute a (C^1) Hermite interpolation for each of them. Compute the interpolation error by sampling. Plot the function and the interpolations.

8. For (general) N<10 sample N+1 point on the curve (Subscript[c, 1]). Compute the tangent vectors at these points a interpolate the curve on the subintervals by a Ferguson cubic curve. Compute the Hausdorff distance of (Subscript[c, 1]) and the interpolation at each segment. Plot the curve and the interpolations.