This set of Computer Graphics Multiple Choice Questions & Answers (MCQs) focuses on “Liang-Barsky Line Clipping”.

1. Liang–Barsky algorithm is a __________ clipping algorithm.

a) circle

b) text

c) line

d) pixel

View Answer

Explanation: Liang–Barsky algorithm is a line clipping algorithm. The Liang–Barsky algorithm uses the parametric equation of a line for clipping operations.

2. The ideas of the Liang-Barsky algorithm are the same with which algorithm?

a) Cyrus Beck algorithm

b) Liam-Chopsky algorithm

c) Cohen Sutherland algorithm

d) All have the same

View Answer

Explanation: The ideas for clipping line of Liang-Barsky and Cyrus-Beck are the same. The only difference is Liang-Barsky algorithm has been optimized for an upright rectangular clip window.

3. Liang Barsky algorithm can be used to clip 3-D lines.

a) True

b) False

View Answer

Explanation: Liang Barsky algorithm can be used for 1-D lines, 2-D lines, and 3-D line clipping. This algorithm can be used for line clipping of 4-D lines too.

4. This algorithm uses the ____________ equations for a line and solves four inequalities.

a) linear

b) quadratic

c) cubic

d) parametric

View Answer

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.

5. The Liang-Barsky algorithm is more efficient than the Cohen Sutherland algorithm.

a) True

b) False

View Answer

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

6. When the line is parallel to the boundaries then what is the value of p_{k}?

a) p_{k} < 0

b) p_{k} > 0

c) p_{k} = 0

d) p_{k} = 1

View Answer

Explanation: When pk < 0 line starts exceeding the boundary while if p

_{k}> 0 line is bounded inside the boundary. When the line is parallel then p

_{k}= 0.

7. 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

View Answer

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.

8. 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

View Answer

Explanation: When p

_{k}< 0 line starts exceeding the boundary while if p

_{k}> 0 line is bounded inside the boundary. When the line is parallel then p

_{k}= 0.

9. How many inequalities are solved in this algorithm?

a) 3

b) 2

c) 1

d) 4

View Answer

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.

10. What is the relative speed improvement over Cohen-Sutherland algorithm for 2-D lines?

a) 40%

b) 50%

c) 70%

d) 36%

View Answer

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

**Sanfoundry Global Education & Learning Series – Computer Graphics.**

To practice all areas of Computer Graphics, __here is complete set of 1000+ Multiple Choice Questions and Answers__.