An Algorithm for Determining the Points of Set Inclusion of Convex Polygon Based on Topological Mapping[J]. Journal of Image and Graphics, 2003, 8(4): 468. DOI: 10.11834/jig.200304157.
An Algorithm for Determining the Points of Set Inclusion of Convex Polygon Based on Topological Mapping
the inclusion test of whether a set of points is in a polygon or not can be converted to comparing the projected points' position on the projection line. At first
the center point for topological mapping must be figured out
then the method maps vertices of the polygon onto the projection line. To each point of the set
according to the position of its mapping point and the mapping points of the vertices
it is confirmed that the point is in the area of two lines from the center point to the two vertices of one of the polygon's edges. And then
according to the two cases
whether the point is in the edge's box or not
we can draw a conclusion. If the point is out of the edge's box
the calculation of comparing its position with the edge's box's is only needed
and if the point is in or on the boundary of the edge's box
the calculation of cross product must be added. To the points of set
througth pre calculation of the polygon's vertices this algorithm can greatly reduce calculation of each point. Experiments show that this algorithm is rapid