A line joining the end points (-2,5) to (30,50) clipped against the rectangle having diagonally opposite corner (0,0) and (20,40) . Calculate visible segments of line. code example
Example: Cohen Sutherland Line Clipping Algorithm: In the algorithm, first of all, it is detected whether line lies inside the screen or it is outside the screen. All lines come under any one of the following categories: Visible Not Visible Clipping Case
Cohen Sutherland Line Clipping Algorithm:
In the algorithm, first of all, it is detected whether line lies inside the screen or it is outside the screen. All lines come under any one of the following categories:
Visible
Not Visible
Clipping Case