CENTER SEAT EXAM |

This is a closed-book, closed-notes,
no-calculators exam. Exam given, Wednesday, July 31st.
Write __all__ answers in your exam book.
Do __not__ turn in this question sheet.
You should keep it and bring it with you when I go over the
exam in class.

1. For the curve to the right, made up of two cubic Bézier curves,
draw the control points
P_{2}, P_{3}, P'_{2} and P'_{3},
arranged in such a way that the curve directions at P_{1}
and P'_{4} are
correct and their is no discontinuity in the curve slopes at the
meeting point P_{4}, P'_{1}. |

**2.** In the diagram below, a Bézier curve is to be drawn
from P_{1} to P_{4} using control points
P_{2} and P_{3} which are both located at 0,8.

Use the cubic Bézier formula for the curve:

Q(t) = (1 - t)^{3} P_{1} + 3t(1 - t)^{2} P_{2}
+ 3t^{2}(1 - t) P_{3} + t^{3} P_{4}

and apply it to the following figure. In particular, compute the x,y coordinates of the point on the curve at t = 1/2. By symmetry, this point should lie along the line from 0,8 to 8,0. Does it? Describe the convex hull of the four control points. Is the point you computed within this hull?

**3.** A point P has x,y location 5√2, 5√2
(x and y both 5 `x` sqrt(2)), so it is a distance 10 from the origin.
Using 3x3 transformations in homogeneous coordinates for two
dimensions, do the following:

- Write out the transformation matrices T
_{rot}for a rotation by +π/4 and T_{trans}for a translation by Δx = +20. - Apply the matrices to P, first rotating the point and then translating it. (Get the matrix order right!) What is the location of the transformed point P' ? Is this what you expected? (All computations involving √2 can be kept in that form. There is no need to use its numerical value 1.4142135....)
- Apply the transformations to the original point P in the opposite order,
applying T
_{trans}first and then T_{rot}. Is this what you expected? (The result should not be as neat.)

4. For the irregular region shown to the right, show the steps in the
recursive boundary-fill algorithm until the entire region is filled. You might
find it convenient to keep track of the stack, or you could simply rely
on your numbering of the stacked pixels to keep the order of the fill
straight. |

**5.** This question involves only 2x2 matrices, not ones using
homogeneous coordinates.

- Plot, approximately, the sine and cosine function in the region from -π to +π.
- Using the values you demonstrated in (a) write out the rotation matrix, R(π/2) in numerical form.
- Assume you are given a line with x,y endpoints 10,0 and 10,5. Compute the values of the endpoints after rotation by the matrix in (b). Draw, approximately, the original line and the rotated line. Is this what you expected?
- Write out the rotation matrix R(-π/2). Then show, by matrix multiplication, that the matrix product R(π/2)•R(-π/2) equals the unit matrix.

Return to the COM1370 home page