CSC 461: Computer Graphics I (Fall 2006)
Assignment 2
(Chapters 2
and 3)
Due
1. We
saw that a fundamental operation in graphics system is to map a point (x, y),
which lies within a clipping rectangle, to a point (xs,
ys), which lies in the viewport
of a window on the screen. Assume that the two rectangles are defined by
OpenGL function calls
glViewport(u, v, w, h);
gluOrtho2D(x_min, x_max, y_min, y_max);
Find the mathematical equations
that map (x, y) into (xs, ys).
2. Devise a test for the convexity of a two-dimensional polygon. (You should describe your test algorithm in either pseudo code or natural languages considering different cases)
3. The mapping from a point in object or world coordinates to one in screen coordinates is well defined. It is not invertible because we go from three dimensions to two dimensions. Suppose, however, that we are working with a two-dimensional application. Is the mapping invertible? What problem can arise if you use a two-dimensional mapping to return to a position in object or world coordinates by a locator device.
4. Consider
a table with a two-dimensional sensing device located at the end of two linked
arms, as shown in the figure. Suppose that the lengths of the two arms are
fixed, and the arms are connected by simple (1-degree-of-freedom) pivot joints.
Determine the relationship between the joint angles θ and φ and the
position of the sensor (located at the end of the second arm).