Content deleted Content added
Remove direction to the reader. Tags: Mobile edit Mobile web edit Advanced mobile edit |
Sammy99jsp2 (talk | contribs) m Update 1st reference, and found a replacement for 2nd reference's dead link. |
||
Line 1:
{{Short description|Line-clipping algorithm}}
In [[computer graphics]], the '''Liang–Barsky algorithm''' (named after [[You-Dong Liang]] and [[Brian A. Barsky]]) is a [[line clipping]] algorithm. The Liang–Barsky algorithm uses the parametric equation of a line and inequalities describing the range of the clipping window to determine the intersections between the line and the [[clip window]]. With these intersections, it knows which portion of the line should be drawn. So this algorithm is significantly more efficient than [[Cohen–Sutherland]]. The idea of the Liang–Barsky clipping algorithm is to do as much testing as possible before computing line intersections.
The algorithm uses the parametric form of a straight line:
Line 158:
==References==
* Liang, Y. D., and Barsky, B., "[
* Liang, Y. D., B. A., Barsky, and M. Slater, ''[
* James D. Foley. ''[https://books.google.com/books/about/Computer_graphics.html?id=-4ngT05gmAQC Computer graphics: principles and practice]''. Addison-Wesley Professional, 1996. p. 117.
|