1.

The Liang-Barsky line clipping algorithm uses the parametric equation of a line from (x1,y1) to (x2,y2) along with its infinite extension which is given as :x = x1 + Dx.uy = y1 + Dy.uWhere Dx = x2 – x1, Dy = y2 – y1, and u is the parameter with 0 ≤ u ≤ 1. A line AB with end points A(–1, 7) and B(11, 1) is to be clipped against a rectangular window with xmin=1, xmax=9, ymin=2, and ymax=8. The lower and upper bound values of the parameter u for the clipped line using Liang-Barsky algorithm is given as:

A. (0, 2/3)
B. (1/6, 5/6)
C. (0, 1/3)
D. (0, 1)
Answer» C. (0, 1/3)


Discussion

No Comment Found