1. 1
Question One: Multiple Choices. (15 Marks)
1. To apply the odd-even rule, we conceptually draw a line from a position P to a point outside the
polygon. If the number of polygon edges crossed by this line is 5, then the point P is which of
the following?
a. Interior point
b. Exterior point
c. Undetermined
d. None of the above
2. In the graphics pipeline, which of the following steps is responsible to determine the visibility
and final color of each pixel?
a. Rasterization
b. Vertex Processing
c. Fragment Processing
d. Clipping and Primitive Assembly
3. Suppose we want to draw a line starting at pixel (1, 2) and ending at pixel (7, 5) by using the
DDA algorithm.
Answer the questions from 3 to 7.
What is the value of the (1/slope)?
a. 0
b. 0.5
c. 1
d. 2
4. What is the value of (number of steps)?
a. 3
b. 4
c. 5
d. 6
5. What is the value of the Xincrement?
a. 0.5
b. 1
c. 1.5
d. 2
6. What is the value of the Yincrement?
a. 0.5
b. 1
c. 1.5
d. 2
2. 2
7. After drawing the first pixel (1, 2) of the line, which of the following are the values of the next
three pixels? [2 marks]
a. (2, 2), (3, 3), and (4, 3)
b. (1, 3), (2, 3), and (3, 4)
c. (2, 3), (3, 3), and (4, 4)
d. (1,3), (2, 4), and (3, 5)
8. In the scan-line polygon-fill algorithm, we can predict the values of x-intercept with each new
scan line. Given that the counter=0 and slope = 5/2, what are the successive values of counter
for the next five scan lines? [2 marks]
a. 1, 2, 3, 4, 5
b. 2, 4, 5, 6, 8
c. 2, 4, 6, 3, 5
d. 2, 4, 1, 3, 0
9. A triangle is defined by the points (2, 2), (3, 2), and (3, 4).
What are the transformed coordinates of the triangle points after the translation with 2 units in
the x-direction and 3 units in the y-direction? [2 marks]
a. (2, 5), (3, 5), and (3, 7)
b. (4, 5), (5, 5), and (5, 7)
c. (4, 2), (5, 2), and (5, 4)
d. (4, 4), (3, 6), and (5, 8)
10. A triangle is defined by the points (2, 2), (3, 2), and (3, 4).
What are the transformed coordinates of the triangle points after the Rotation 90 degrees about
the origin? [3 marks]
a. (-2, 2), (-2, 3), and (-4, 3)
b. (2, -2), (3, -2), and (3, -4)
c. (-2, -2), (-3, 2), and (-3, 4)
d. (2, 2), (2, 3), and (4, 3)
Question Two: True or False. (5 Marks)
1. In a random scan system, the electron beam is swept across the screen, one row at a time from
top to bottom.
a. True
b. False
2. In a non-interlaced system, the pixels are displayed row by row, or scan line by scan line, at the
refresh rate.
a. True
b. False
3. The DDA algorithm is faster than the Bresenham’s algorithm.
a. True
b. False
4. The Boundary Fill algorithm is used for filling a region with multiple boundary colors.
a. True
b. False
5. In the Flood Fill Algorithm, the condition for coloring a pixel is that the color of this pixel is
the same as the old interior color.
a. True
b. False
Good Luck and Best Wishes
Dr. Wafaa Samy