A Procedure to Clip Line Segment
Bimal Kumar Ray · International Journal of Computer Graphics · 2014
This paper proposes a procedure to clip a line segment in 2D that does not compute false intersection point and is easy to implement. The procedure is compared with the classical algorithms viz. Cohen-Sutherland, Liang-Barsky and Nicholl-Lee-Nicholl. It is found that the number of comparisons required by the procedure is significantly less than that required by the Cohen-Sutherland and Liang-Barsky algorithm and this observation is supported by actual execution time. It is also found that the implementation of the procedure is easier than that of the Nicholl-Lee-Nicholl algorithm. The procedure requires two calls to a single routine. Since the second call does not need the results of the first call, hence the two calls can be made in parallel improving the performance by two-fold.