CS335 Fall, 2008 Homework 9 (20 points) Due: December 2, 2008 (Tuesday) ************************************************************************ 1. (Polygon Clipping) To ensure a given polygon is clipped properly against a window, sometimes we have to use Weiler-Atherton's clipping algorithm. For that particular algorithm, if we are clipping a polygon against the left boundary of a window, where should we start the clipping process? Justify your answer. (10 points) 2. (Rendering of B-spline Curve Segments) To render a cubic B-spline curve segment, one possibility is to convert the B-spline control points P0, P1, P2, and P3 into Bezier control points Q0, Q1, Q2 and Q3, using the following formula Q1 = P1 + (P2 - P1)/3 Q2 = P1 + 2(P2 - P1)/3 A = P1 + (P0 - P1)/3 B = P2 + (P3 - P2)/3 Q0 = (A + Q1)/2 Q3 = (B + Q2)/2 and then render it using techniques developed for cubic Bezier curve segments. Why do we know Q0, Q1, Q2 and Q3 defined the above way are the Beizer control points of the cubic B-spline curve? (5 points) 3. (Homogeneous Coordinates) What is the main reason for us to use homogeneous coordinates in computer graphics? Why? (5 points) ************************************************************************ Put you solution set in a text file and send the text file to me (cheng@cs.uky.edu) before midnight of the due day. CS535 (Fall 2008) Solution of Homework 9 Due: 12/2/09 Name: xxxxxx xxxxxx