Question:medium

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

The Correct Option is B

Solution and Explanation

The signature idea of region codes, also called outcodes, belongs to one classic method. Around the rectangular clip window the plane is split into nine zones, and each endpoint gets a 4-bit code for the top, bottom, right, and left half-planes.

Trivial rejection happens when the bitwise AND of the two endpoint codes is non-zero, and trivial acceptance when both codes are zero. This is the Cohen-Sutherland line clipping algorithm.

Liang-Barsky is parametric, Weiler-Atherton handles polygon clipping, and midpoint subdivision repeatedly halves the segment, so none of them use outcodes.

\[\boxed{\text{Cohen-Sutherland Algorithm}}\]
Was this answer helpful?
0