In Cohen-Sutherland algorithm, a region is encoded using ____ bits.
In Cohen-Sutherland algorithm, a region is encoded using ____ bits.
Answer: C. 4 — In the Cohen-Sutherland line clipping algorithm, each point is assigned a 4-bit region code representing its position relative to the clipping window…
- A.
2
- B.
3
- C.
4
- D.
5
Attempted by 211 students.
Show answer & explanation
Correct answer: C
In the Cohen-Sutherland line clipping algorithm, each point is assigned a 4-bit region code representing its position relative to the clipping window boundaries:
Each bit corresponds to one of the four boundaries: Top, Bottom, Right, and Left.
The bits indicate whether the point lies above, below, right, or left of the clipping area.
This 4-bit code helps efficiently determine whether a line segment is completely inside, completely outside, or partially inside the clipping window.