Liang Barsky Line Clipping Algorithm

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 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