






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Liang-Barsky Line Clipping Algorithm This algorithm uses the parametric equations for a line and solves four inequalities to find the range of the parameter for which the line is in the viewport. Parametric Equations are given below:
๐
๐
2
2
๐๐๐๐
๐๐๐๐
๐๐๐๐
๐๐๐๐
Liang-Barsky Line Clipping Algorithm
๐
Liang-Barsky Line Clipping Algorithm
๐
value is taken if ๐ ๐
๐ ๐ , the line is completely outside the window
Liang-Barsky Line Clipping Algorithm
Liang-Barsky Line Clipping Algorithm
๐๐ ๐๐
๐๐ ๐๐
๐๐ ๐๐
โข ๐๐= max( 0 , 0. 25 , 0. 1 ) = 0. 25 , for the values (๐๐ < 0 ) โข ๐๐= min( 0. 25 , 0. 1 , 1 )= 0. 3 , for the values (๐๐ > 0 )
Calculate the intersection points: ๐๐๐ = ๐๐ + ๐๐ *ฮ ๐ = 10 + 0. 25 * 50 = 22. 5 ๐๐๐ = ๐๐ + ๐๐ *ฮ y = 10 + 0. 25 * 20 = 15 ๐๐๐ = ๐๐ + ๐๐ *ฮ ๐ = 10 + 0. 3 * 50 = 25 ๐๐๐ = ๐๐ + ๐๐ *ฮ y = 10 + 0. 3 * 20 = 16 The Clipped Line end points are ( 22.5,15) & (25, 16)