Thursday 3 April 2014

                                                 

  • It is more efficient than cohen and sutherland line algorithm liang barsky.
  •  liang barsky has developed the algorithm using the parametric equation are:
x= x1+TX
y= y1+TY
                                                         where X= x1-x2, Y= y1-y
  •  The point clipping condition for liang barsky are:
                         xw min <= x1+TX <= xw max
                         yw min <= y1+TY <=yw max
  • Liang barsky express these four with two parameter p and q as t pi<qi where i=1,2,3.......
             where the parameter p and q are :
              p1 = -X , p2 = X , p3= -Y , p4 = Y and q1 = x1-xw min , q2= xw max- x1 , q3= y1-yw min ,              q4= yw max - y1
  •  If pi= 0 then line is parallel to  i th boundary where i=1,2,3......
  •  If qi= 0 then line is completely outside the boundary so we can discard the line.
  • The non zero value of pi the line cross the clipping boundary and we have to find the parameter 't'. where t= qi/pi
  •  this algorithm find the two value of 't' such as 't1' and 't2'.
  • The value of 't1' is taken as the largest value among various values of intersection with all edges i.e; pi < 0. and The value of 't2' is taken as the smallest value i.e; pi > 0.
  •  if (t1<t2) then some formulas are used to find the ends points .
  1.   xx1= x1+t1X
  2.   xx2= x1+ t2X
  3.  yy1= y1+ t1Y
  4.  yy2 = y2+t2Y (Then draw the line)
  • STOP 


  

ADVANTAGES OF LIANG BARSKY ALGORITHM
  1.  It is more efficient then sutherland and cohen algorithm because intersection calculation are reduce.
  2. It required only one division to update parameter p1 and p2.
  3. Window intersection of the lines are computed only once.






1 comment:

  1. 1-4 of 3: A new level of strength in our 3-A new level of strength in our 3-A
    A new level of strength in our 3-A new level of infiniti pro rainbow titanium flat iron strength in our 3-A new used ford escape titanium level of strength in our 3-A new level of strength in our 3-A new level of strength in our titanium vs stainless steel apple watch 3-A new level titanium pots and pans of strength titanium apple watch in our 3-A new level

    ReplyDelete