|
计算机科学 2006
An Improved Algorithm of Cyrus-Beck Segment Clipping to Process Concave Polygon
|
Abstract:
Based on the analysis of currently popular algorithms for segment clipping, in this paper, an improvement in the algorithm of Cyrus-Beck segment is proposed, which extends the algorithm to the range of concave polygon. The calculation of the intersection points is decreased to the minimum by the means of verifying the position of the line to be clipped against the polygon. And marking those intersection points with "in" or "out" to decide which sub-line between the two intersection points is visible. Both theoretic analysis and example testing show that the new algorithm is better than well known algorithms.