30.08.2014 Views

Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...

Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...

Past Midterm and Exam Questions (PDF) - Student.cs.uwaterloo.ca ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

58 CS488/688 Introduction to Computer Graphi<strong>cs</strong><br />

(d) Re<strong>ca</strong>ll that a Bézier curve <strong>ca</strong>n be constructed from n + 1 contr ol points P 0 , . . . , P n using the<br />

equation<br />

( )<br />

n∑<br />

n<br />

P (t) = Bi n (t)P i where Bi n (t) = (1 − t) n−i t i .<br />

i<br />

i=0<br />

Assume that points P 0 , P 1 , P 2 <strong>and</strong> P 3 define a cubic Bézier segment in the plane. Suppose<br />

that we wish to draw a second cubic Bézier segment defined by points Q 0 , Q 1 , Q 2 <strong>and</strong> Q 3<br />

in such a way that the two segments join with C 2 continuity. Give explicit formulas for the<br />

lo<strong>ca</strong>tions of Q 0 , Q 1 <strong>and</strong> Q 2 , each in terms of the P s, that guarantee C 2 continuity. (You <strong>ca</strong>n<br />

derive the formulas by drawing <strong>and</strong> examining a diagram of the two segments, or by working<br />

from the mathemati<strong>ca</strong>l definition directl y.)<br />

(e) Bonus. Is it possible to position control points {P 0 , P 1 , P 2 , P 3 } <strong>and</strong> {Q 0 , Q 1 , Q 2 , Q 3 } in such<br />

a way that the two cubic Bézier segments together form a simple closed curve that is C 2<br />

everywhere? Either show control points that realize this construction, or prove that it is<br />

impossible.<br />

19 Transforms<br />

19.1 Viewport Transformation [Last Used: Winter 2004 <strong>Midterm</strong>]<br />

I have a picture that I’ve expressed in a normalized 2D coordinate system with top left corner<br />

(0, 0) <strong>and</strong> bottom right corner (1, 1) (y grows downward, as in screen coordinates). I’d like to print<br />

the picture as PostScript, centered on an 8.5” × 11” page with a one-inch margin. One unit in<br />

PostScript is equal to 1<br />

72<br />

”. The picture should be centered on the page, <strong>and</strong> s<strong>ca</strong>led uniformly to be<br />

as large as possible while still fitting within the margins. The two coordinate systems are shown<br />

below.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!