Algorithm for Polygon in Polygon
Xun Yao
Abstract
Xun Yao
Abstract
The relationship test of two polygons is algorithm for polygon in polygon.The prepared algorithm is complex;a new algorithm was given in this paper:every peak of two polygons was arranged a number in same direction,crossing points of polygon A and polygon B was calculated for every edge of A,these crossing points were ordered same direction as edge.The edges were divided into many segments by crossing points,every segments of polygon A located in polygon B was found out and put in a table lines;in the same way,segments of polygon B located in polygon A were founded out and put in table lines too.A segment in table lines was picked out as first segment,and a segment that can link with its endpoint in lines was found out and put into table points,it is done continuously till the segments is close,it is a new polygon,the common part of this two polygons A and B.Another common part could be found out like this method till lines are empty.The algorithm was proved simply and effectively by programming.
A significance statement is not available in the OpenAlex record.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
The relationship test of two polygons is algorithm for polygon in polygon.The prepared algorithm is complex;a new algorithm was given in this paper:every peak of two polygons was arranged a number in same direction,crossing points of polygon A and polygon B was calculated for every edge of A,these crossing points were ordered same direction as edge.The edges were divided into many segments by crossing points,every segments of polygon A located in polygon B was found out and put in a table lines;in the same way,segments of polygon B located in polygon A were founded out and put in table lines too.A segment in table lines was picked out as first segment,and a segment that can link with its endpoint in lines was found out and put into table points,it is done continuously till the segments is close,it is a new polygon,the common part of this two polygons A and B.Another common part could be found out like this method till lines are empty.The algorithm was proved simply and effectively by programming.
Key concepts: Rectilinear polygon, Polygon (computer graphics), Polygon covering, Visibility polygon, Star-shaped polygon, Point in polygon, Simple polygon, Combinatorics