Liang–Barsky algorithm: Difference between revisions

Content deleted Content added
Correction of code: Should be: float r4 = q4/p4; It was: float r4 = q4/r4;
No edit summary
Line 1:
In [[computer graphics]], the '''Liang–Barsky algorithmLiang–''' (named after [[You-Dong Liang]] and [[Brian A. Barsky]]) is a [[line clipping]] algorithm. The Liang–Barsky algorithmLiang– 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. 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.
 
 
Line 181:
* http://hinjang.com/articles/04.html#eight
 
{{DEFAULTSORT:Liang-Barsky algorithm}}
[[Category:Line clipping algorithms]]