# CS 426 Exercises   2D Primitives and Rendering

1. What is the area of a 2D point? a 2D ray? a 2D line?
2. What is the length of the projection of vector V1 onto V2?
3. In the parametric representation for a 2D line (P = P0 + tV), what are the geometric interpretations of  P0 and V?
4. In the implicit representation for a 2D line (ax + by + c), what are the geometric interpretations for a, b, and c?
5. 2D lines have both a parametric and an implicit representation.  For which geometric operations (drawing, distance, intersection, etc.) is each representation most efficient?
6. What are the steps in a 2D rendering pipeline?  Describe the input and output of each step.
7. Why are scenes often described by objects in different coordinate systems?
8. Describe the sequence of transformations a 2D vertex can undergo during 2D rendering.
9. What types of 2D transformations can be represented with a 2x2 matrix?
10. What types of 2D transformation can be represented by a 3x3 matrix and 2D homogeneous coordinates?
11. Why is it important to clip 2D polygons to the window prior to display?
12. Why is the Cohen-Sutherland line clipping algorithm more efficient than a simpler algorithm that just successively clips each line to the four lines bounding the window?
13. What is a window? a viewport? What viewing operation results from making the window smaller?  Moving the window horizontally?  Making the viewport smaller?  Moving the viewport horizontally?
14. Why is the sweep-line algorithm more efficient for scan converting triangles than the simpler algorithm that tests each pixel individually to see if it's inside the triangle?
15. What is the odd-parity rule for testing if a point is inside a polygon?  What is the nonzero winding number rule?  Give an example polygon for which the two rules produce different results.  Which rule does the sweep-line algorithm implement?
16. How is scan-conversion of concave polygons performed in OpenGL?  Why?