Cyrus Beck Line Clipping Algorithm
Cyrus Beck Line Clipping:
Cyrus Beck is a line-clipping algorithm that is made for convex polygons. It was originally introduced by Cyrus and Beck in 1978. It is more efficient and faster than Cohen-Sutherland Line Clipping Algorithm where the lines are clipped about four times. For a point P(t) on the line P1P2 to be the point of intersection with an edge Ei of a convex clipping window:
Steps of Cyrus Beck Line Clipping Algorithm:
1. Ni.[P(t) – Pi]=0
2. Ni.[P1 + (P2 – P1)t – Pt]=0
3. Ni.[P1 – Pi] + Ni.[P2 – P1]t=0
4. Ni.[P1 – Pi] + Ni.[P2 – P1]t=0
t= – Ni.[P1 – Pi] / Ni.D
Where D=P1-P2 is the vector from P1 to P2.