Machine-translated by Google. Questions are authored in English.
Top

Discussion

The binary region code assigned to the line end point located at the bottom-right side of the clipping rectangle in the Cohen-Sutherland line clipping algorithm is ............. .

  • A.0110
  • B.1010
  • C.0101
  • D.1001

Answer: A

The bottom-right region code is 0110.

Cohen-Sutherland gives each end point a 4-bit code, conventionally ordered top, bottom, right, left. A bit is 1 when the point lies beyond that edge of the clipping window.

A point below and to the right of the window is beyond the bottom and right edges, so it gets 0 1 1 0.

1010 would be top-right, 0101 bottom-left and 1001 top-left.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.