2D line clipping-Cohen
Sutherland
, • This is one of the earliest algorithms to be developed for fast line clipping, and variations of th
method are widely used.
• Processing time is reduced in the Cohen-Sutherland method by performing more tests before
proceeding to the intersection calculations.
• Initially, every line endpoint in a picture is assigned a four-digit binary value, called a region co
and each bit position is used to indicate whether the point is inside or outside one of the clip
window boundaries.
• We can reference the window edges in any order, and Figure illustrates one possible orderin
with the bit positions numbered 1 through 4 from right to left.
Sutherland
, • This is one of the earliest algorithms to be developed for fast line clipping, and variations of th
method are widely used.
• Processing time is reduced in the Cohen-Sutherland method by performing more tests before
proceeding to the intersection calculations.
• Initially, every line endpoint in a picture is assigned a four-digit binary value, called a region co
and each bit position is used to indicate whether the point is inside or outside one of the clip
window boundaries.
• We can reference the window edges in any order, and Figure illustrates one possible orderin
with the bit positions numbered 1 through 4 from right to left.