Project 2b ©Jorg Peters

Points: 45

Purpose

Interact with smooth curves.

Set Up

For each Task below show


The B-spline control points \(P_i\) are the same for all three Tasks.

The \(c_{i,j}\) in Task 3,4 are called BB-coefficients

Task 1: Connect the points

Points: 5

Task 2: Subdivision

Points: 10

From the polygon in Task 1, generate a smoother curve by subdivision.

Task 3: \(C^1\) Bézier (BB-form)

Points: 10

Another way to generate a curve is to construct several smoothly connected pieces in Bernstein-Bézier (BB) form.

We construct N BB-pieces of degree 2. The \(i\)th piece has BB-coefficients \(\mathbf{c}_i=\{c_{i,0},c_{i,1},c_{i,2}\}\).
The interior BB-coefficient is:

\[c_{i,1} := P_{i}\]

Determine \(c_{i,0}\) and \(c_{i,2} = c_{i+1,0}\) so that the polynomial pieces join \(C^1\).
Write down the formulas for the BB-coefficients in terms of the B-spline control points in readme.txt

Task 4: Draw the Bezier curve

Points: 15

Let \(n\) be the tessellation number (= number of evaluations-1 = number of segments) per BB-piece.

Task 5: Is it a circle?

Points: 5

BONUS

Points: 10

Implement Task 4 using the OpenGL 4.x's tessellation engine. (You will have to use the web for details -- or sign up for Advanced Graphics) Make a note in the readme.txt file.

PENALTY

Points: -10

Make sure picking still works on the original \(N\) vertices, and your curves adapt when moved.

WHAT TO SUBMIT