International Journal of Computer Applications |
Foundation of Computer Science (FCS), NY, USA |
Volume 127 - Number 3 |
Year of Publication: 2015 |
Authors: Sushil Chandra Dimri |
10.5120/ijca2015906352 |
Sushil Chandra Dimri . A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics. International Journal of Computer Applications. 127, 3 ( October 2015), 31-34. DOI=10.5120/ijca2015906352
The most popular lines clipping algorithms are Cohen-Sutherland and Liang-Barsky line clipping algorithm. These algorithms are complex and the steps of calculation are very high. This paper proposes a simple new line clipping algorithm for 2D space which uses the parametric equation of the line. This algorithm further easily extended to the polygon clipping by considering the edge of the polygon as a line. The proposed algorithm is numerically tested for a numbers of random line segments and the results show the simplicity and less complex behavior of the algorithm.