Question:

Which of the following clipping algorithms uses a region code system to classify line segments?

Show Hint

Look for the method famous for 4-bit outcodes around the clip window.
Updated On: Jul 2, 2026
  • Midpoint Subdivision Algorithm
  • Cohen-Sutherland Algorithm
  • Liang-Barsky Algorithm
  • Weiler-Atherton Algorithm
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: The question asks for a line clipping method that assigns region codes to endpoints.

Step 2: The Cohen-Sutherland algorithm divides the plane around the clip window into nine regions and gives each a 4-bit outcode. Each bit flags whether a point is above, below, left, or right of the window.

Step 3: Using these codes, the algorithm quickly accepts or rejects lines by logical AND and OR tests on the endpoint codes.

Step 4: Liang-Barsky uses parametric tests, Weiler-Atherton clips polygons, and midpoint subdivision bisects lines. Only Cohen-Sutherland uses region codes.
Was this answer helpful?
0
0