An Efficient Algorithm for Complex Polygon Clipping
-
-
Abstract
We popose an efficient algorithm for complex polygon clipping by adopting the trapezium segmentation technique and scan-line idea.Firstly,we find and compute the intersection points between main polygons and window polygons,then we record and sort the Y values of these points and the points in all polygons.Secondly,we cut all the polygons into some trapezium units by drawing the scan lines on the basis of these Y values and intersecting the edges of all polygons with the scan lines.Thirdly,we complete the trapezium-split operation line by line and pick up the intersection parts between the trapezia from main polygons and those from window polygons.Finally,we acquire the clipping polygons by tracing the boundary of the intersection parts.This algorithm ovecomes the complex computations such as the line reorganization and calculation of entry and exit points on the polygons.
-
-