InterviewSolution
Saved Bookmarks
| 1. |
The Liang-Barsky line clipping algorithm uses the parametric equation of a line from (x1, y1) to (x2, y2) along with itsinfinite extension which is given as :x = x1 + ∆x.uy = y1 + ∆y.uWhere ∆x = x2– x1, ∆y = y2– y1, and u is the parameter with 0 < u < 1. A line AB withend 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» | |