Computer Graphics Questions and Answers Part-21

1. This algorithm uses the ____________ equations for a line and solves four inequalities.
a) linear
b) quadratic
c) cubic
d) parametric

Answer: d
Explanation: This algorithm uses the parametric equations for a line and solves four inequalities to find the range of the parameter for which the line is in the viewport.

2. The Liang-Barsky algorithm is more efficient than the Cohen Sutherland algorithm.
a) True
b) False

Answer: a
Explanation: Liang–Barsky clipping algorithm does as much testing as possible before computing line intersections, hence it is much more efficient than others.

3. When the line is parallel to the boundaries then what is the value of pk?
a) pk < 0
b) pk > 0
c) pk = 0
d) pk = 1

Answer: c
Explanation: When pk < 0 line starts exceeding the boundary while if pk > 0 line is bounded inside the boundary. When the line is parallel then pk = 0.

4. Which type of arithmetic is used in Liang Barsky algorithm?
a) simple arithmetic operations
b) floating point arithmetic
c) fixed point arithmetic
d) logarithmic operations

Answer: b
Explanation: Liang and Barsky have created an algorithm that uses floating-point arithmetic but finds the appropriate endpoints with at most four computations with use of parametric equations.

5. When pk < 0, then the line is ___________
a) parallel to the boundaries
b) exceeding the boundaries
c) bounded inside the boundaries
d) can’t say

Answer: b
Explanation: When pk < 0 line starts exceeding the boundary while if pk > 0 line is bounded inside the boundary. When the line is parallel then pk = 0.

6. How many inequalities are solved in this algorithm?
a) 3
b) 2
c) 1
d) 4

Answer: d
Explanation: Liang-Barsky line clipping algorithm solves 4 inequalities to find the range of the parameter for which the line is in the intersection with the rectangle.

7. What is the relative speed improvement over Cohen-Sutherland algorithm for 2-D lines?
a) 40%
b) 50%
c) 70%
d) 36%

Answer: d
Explanation: The relative speed improvement over Sutherland-Cohen algorithm are: – 36% for 2D lines, 40% for 3D lines, 70% for 4D lines.

8. Cohen Sutherland clipping algorithm computes _______ number of intersections than NLN line clipping.
a) more
b) less
c) same
d) can’t be predicted

Answer: a
Explanation: One of the problems common to both the Cohen-Sutherland and the Liang-Barsky algorithm is that more intersections are computed than necessary.

9. Liang-Barsky clipping algorithm computes _______ number of intersections than NLN line clipping.
a) more
b) less
c) same
d) can’t be predicted

Answer: a
Explanation: One of the problems common to both the Cohen-Sutherland and the Liang-Barsky algorithm is that more intersections are computed than necessary.

10. What is full form of NLN line clipping algorithm?
a) Nicholl-Liang-Nicholl algorithm
b) Nicholai-Liang-Nicholl algorithm
c) Nicholai-Lee-Nicholl algorithm
d) Nicholl-Lee-Nicholl algorithm

Answer: d
Explanation: The full form of NLN clipping algorithm is Nicholl-Lee-Nicholl algorithm. It is a fast method of clipping.