A Simple and Efficient Algorithm for Line and Polygon Clipping in 2-D Computer Graphics
Author(s) -
Sushil Chandra
Publication year - 2015
Publication title -
international journal of computer applications
Language(s) - English
Resource type - Journals
ISSN - 0975-8887
DOI - 10.5120/ijca2015906352
Subject(s) - computer science , polygon (computer graphics) , clipping (morphology) , simple (philosophy) , computer graphics , computer graphics (images) , algorithm , graphics , simple polygon , line (geometry) , regular polygon , telecommunications , mathematics , geometry , philosophy , linguistics , epistemology , frame (networking)
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. Keywordsclipping algorithm, Cohen-Sutherland line clipping algorithm, Liang-Barsky line clipping algorithm. 2D space
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom