Computer Graphics Questions and Answers Part-24

1. Which of the following polygon clipping algorithm can be used to clip a filled area?
a) Sutherland Hodgman Clipping Algorithm
b) Weiler Atherton Clipping Algorithm
c) Vatti Clipping Algorithm
d) Greiner Hormann Clipping Algorithm

Answer: b
Explanation: Weiler Atherton Clipping algorithm helps us to clip a filled area. The filled area may be a convex polygon or concave polygon. This algorithm was introduced to identify the visible surfaces. This algorithm helps to create individual polygons in some cases.

2. In Weiler Atherton Clipping Algorithm which of the following is consider to clip a polygon?
a) Polygon edges and Window boundaries
b) Polygon Vertices
c) Polygon Edges
d) Window boundaries

Answer: d
Explanation: In the Weiler Atherton algorithm, we consider the view pane boundaries instead of edges and vertices of the polygon to clip a polygon. Points very close to the edge of the other polygon may be considered as both in and out until their status can be confirmed after all the intersections have been found and verified but this increases the complexity.

3. Which of the following algorithm can be used to clip a self-intersecting polygon?
a) Greiner Hormann Clipping Algorithm
b) Weiler Atherton Clipping Algorithm
c) Vatti Clipping Algorithm
d) Both Vatti and Greiner Hormann Clipping Algorithm

Answer: d
Explanation: To clip a self-intersecting polygon we can use the Vatti Clipping Algorithm as well as the Greiner Hormann Clipping Algorithm. Polygons with holes can also be clipped using these algorithms. Algorithms like Sutherland-Hodgman and Weiler-Atherton cannot perform clipping on a self-intersecting polygon.

4. Vatti Clipping Algorithm uses the sweep line approach to clip a polygon.
a) True
b) False

Answer: a
Explanation: The Vatti Clipping algorithm uses the sweep line approach to clip a polygon. In scan line approach the selected polygon is selected and placed upon imaginary horizontal lines that passes through the polygons every vertex and divides the polygon on different parts.

5. Greiner Hormann Clipping Algorithm is more efficient than the Vatti Clipping Algorithm.
a) True
b) False

Answer: a
Explanation: The Greiner Hormann Clipping Algorithm works better than the Vatti Clipping Algorithm. It can work on self-intersecting polygons as well as non-convex polygons but it cannot work upon polygons having common edges.

6. Which of the following algorithm can be used to clip a polygon in 3D space?
a) Weiler Atherton Algorithm
b) Vatti Clipping Algorithm
c) Greiner Hormann Clipping Algorithm
d) Polygon in 3D space cannot be clipped

Answer: a
Explanation: The algorithm that can be used in 3D space as well is Weiler Atherton Algorithm. It is mostly used in 2D space but can be used in 3D space with the help of Z-ordering. The Vatti Clipping algorithm and Greiner Hormann Clipping algorithm only works on 2D space.

7. Which of the following clipping algorithm is based upon the “inside” of a polygon based on the winding number?
a) Sutherland Hodgman Clipping Algorithm
b) Weiler Atherton Clipping Algorithm
c) Vatti Clipping Algorithm
d) Greiner Hormann Clipping Algorithm

Answer: d
Explanation: The Greiner Hormann Clipping algorithm is based upon the “inside” of a polygon based on the winding number. The winding number of a closed curve in the plane around a given point is an integer representing the total number of times that curve travels counter clockwise around the point. The algorithm considers regions with odd winding number to be inside the polygon.

8. Which of the following can be first used to test for overlap of a curve with the clipping window?
a) Edges of the curve
b) The centre of the curve
c) The bounding rectangle for the curve
d) Tangents to the curve

Answer: c
Explanation: The bounding rectangle for the curve can be used to test for overlap of the curve with the clipping window. We can use the regular polygon clipping on the basis of the condition that is fulfilled if the bounding rectangle for the curve comes inside the viewing window or not.

9. Which of the following step is taken if the bounding rectangle for the curve is completely inside the viewing window?
a) Full curve is discarded
b) Full curve is saved
c) The bounding rectangle cannot be fully inside the viewing window
d) A clipping operation is performed on the curve

Answer: b
Explanation: If the bounding rectangle for the curve is completely inside the viewing window then we save the full curve as the full curve would also be inside the viewing window and there is no need to perform a clipping operation.

10. Which of the following step is taken if the bounding rectangle for the curve is completely outside the viewing window?
a) Full curve is discarded
b) Full curve is saved
c) The bounding rectangle cannot be fully inside the viewing window
d) A clipping operation is performed on the curve

Answer: a
Explanation: If the bounding rectangle for the curve is completely outside the viewing window then we discard the full curve as the full curve would also be outside the viewing window and there is no need to perform a clipping operation.