Back to Search Start Over

Optimal Reliable Point-in-Polygon Test and Differential Coding Boolean Operations on Polygons

Authors :
Jianqiang Hao
Jianzhi Sun
Yi Chen
Qiang Cai
Li Tan
Source :
Symmetry, Vol 10, Iss 10, p 477 (2018)
Publication Year :
2018
Publisher :
MDPI AG, 2018.

Abstract

This paper provides a full theoretical and experimental analysis of a serial algorithm for the point-in-polygon test, which requires less running time than previous algorithms and can handle all degenerate cases. The serial algorithm can quickly determine whether a point is inside or outside a polygon and accurately determine the contours of input polygon. It describes all degenerate cases and simultaneously provides a corresponding solution to each degenerate case to ensure the stability and reliability. This also creates the prerequisites and basis for our novel boolean operations algorithm that inherits all the benefits of the serial algorithm. Using geometric probability and straight-line equation F ( P ) = ( y i − y i + 1 ) ( x p − x i ) − ( y i − y p ) ( x i + 1 − x i ) , it optimizes our two algorithms that avoid the division operation and do not need to compute any intersection points. Our algorithms are applicable to any polygon that may be self-intersecting or with holes nested to any level of depth. They do not have to sort the vertices clockwise or counterclockwise beforehand. Consequently, they process all edges one by one in any order for input polygons. This allows a parallel implementation of each algorithm to be made very easily. We also prove several theorems guaranteeing the correctness of algorithms. To speed up the operations, we assign each vector a number code and derive two iterative formulas using differential calculus. However, the experimental results as well as the theoretical proof show that our serial algorithm for the point-in-polygon test is optimal and the time complexities of all algorithms are linear. Our methods can be extended to three-dimensional space, in particular, they can be applied to 3D printing to improve its performance.

Details

Language :
English
ISSN :
20738994
Volume :
10
Issue :
10
Database :
Directory of Open Access Journals
Journal :
Symmetry
Publication Type :
Academic Journal
Accession number :
edsdoj.0dde8e6068684aa8ae566230d14b7dd6
Document Type :
article
Full Text :
https://doi.org/10.3390/sym10100477