Homework 3 due 11/5/02
This assignment has both a written portion and a programming portion. As a reminder, you are expected to perform all work on your own. Examining others’ solutions or code is not allowed.
Written portion:
1. [13 points] Assume you are given a tensor product Bezier patch.
a) [5 points] Assume all the control points in one row are collinear. Does this imply that one of the isoparameter curves is a line? Why or why not?
b) [8 points] Assume the patch is degree m (in the s direction) by degree n (in the t direction). How many deCasteljau steps are taken if you evaluate first in the s direction then in the t direction? How many if you evaluate in t then s? If m>n, which direction should you evaluate in first, or does it matter?
2. [7 points] Assume you are given a Bezier triangle with the following control points:
[4,0,2]
[7,0,4]
[2,3,0] [6,5,4]
[1,5,2]
[0,8,0]
Give the control points of a Bezier triangle that is first-order continuous along the edge from [0,8,0] to [6,5,4], and that passes through the point [0,-3,0].
3. [10 points] Note: for simplicity, only one of the 3D coordinates will be described in this question. Assume you are given the four curves:
3x2+3x+2 x=[0,1]
2x2-10x+28 x=[0,1]
12x2+14x+2 x=[0,1]
12x+8 x=[0,1]
(remember that these describe only one coordinate) Give the equation for a bilinearly blended Coons patch passing through all four curves.
Programming portion:
[70 points] Write a program to create smooth images of a trimmed Bezier patch. You should write a program that will read in the control points, divide the trimmed region into a bunch of triangles, and evaluate the patch and find the patch normals at the triangle vertices. The trimmed region will be described by a single continuous set of line segments, oriented in a counterclockwise order. Finally, color the patch according to the Gaussian curvature (K). Shade positive K blue, and negative K red.
Again, sample input and skeleton code for display purposes will be provided