Use the Cohen Sutherland algorithm to clip line P1 (70,20) and p2(100,10) against a window lower left hand corner (50,10) and upper right hand corner (80,40).

4 weeks ago

Use the Cohen Sutherland algorithm to clip line P1 (70,20) and p2(100,10) against a window lower left hand corner (50,10) and upper right hand corner (80,40).

Solution:

Given, P1(70,20) and p2(100,10)

Window lower left corner = (50,10)

Window upper right corner = (80,40)

Now, we assign 4 bits binary out code.

Point P1 is inside the window so the out code of P1 = 0000 and the out code for P2 = 0010.

Logical AND operation will give, 0000

Bench Partner
Sep 24, 2021
More related questions

Questions Bank

View all Questions

Top