Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
556 views2 pages

Liang Barsky Line Clipping Algorithm

The Liang-Barsky line clipping algorithm uses parametric equations to calculate values for the parameter t (t1 and t2) that define the points where a line intersects the clipping boundaries of a rectangle. It determines t1 by finding the maximum value where the p parameter is less than 0 when checking the rectangle edges, and t2 by finding the minimum value where p is greater than 0. Clipped portions of the line are defined between t1 and t2.

Uploaded by

PoojaRRane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
556 views2 pages

Liang Barsky Line Clipping Algorithm

The Liang-Barsky line clipping algorithm uses parametric equations to calculate values for the parameter t (t1 and t2) that define the points where a line intersects the clipping boundaries of a rectangle. It determines t1 by finding the maximum value where the p parameter is less than 0 when checking the rectangle edges, and t2 by finding the minimum value where p is greater than 0. Clipped portions of the line are defined between t1 and t2.

Uploaded by

PoojaRRane
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Liang Barsky line clipping algorithm -

The parametric equation for Liang Barsky line clipping algorithm is given as,

From above definitions of p and q we can say that,

The parameter t for any clipping boundary i can be given as,

Liang - Barsky algorithm calculates two values of parameter t : t1 and t2. The value of
t1 is determined by checking the rectangle edges for p < 0. The maximum value is
taken as a value for t1. The value of t2 is determined by checking the rectangle edges
for p > 0. The minimum value is taken as a value for t2.

You might also like