Geometric modeling
Computational geometry: an introduction
Computational geometry: an introduction
Computer graphics: principles and practice (2nd ed.)
Computer graphics: principles and practice (2nd ed.)
On the complexity of point-in-polygon algorithms
Computers & Geosciences
Computational geometry: algorithms and applications
Computational geometry: algorithms and applications
Union and split operations on dynamic trapezoidal maps
Computational Geometry: Theory and Applications
The point in polygon problem for arbitrary polygons
Computational Geometry: Theory and Applications
Introduction to Algorithms: A Creative Approach
Introduction to Algorithms: A Creative Approach
A cell-based point-in-polygon algorithm suitable for large sets of points
Computers & Geosciences
On Compatible Star Decompositions of Simple Polygons
IEEE Transactions on Visualization and Computer Graphics
Technical Section: Point-in-polygon tests by convex decomposition
Computers and Graphics
Layer-Based Representation of Polyhedrons for Point Containment Tests
IEEE Transactions on Visualization and Computer Graphics
A new hierarchical triangle-based point-in-polygon data structure
Computers & Geosciences
A new point containment test algorithm based on preprocessing and determining triangles
Computer-Aided Design
Hi-index | 0.01 |
The 2D point-in-polygon test is a fundamental problem in geometry, and of importance in various applications in computer graphics and other areas. In taking advantage of the basic idea of the polygon scan conversion algorithm, a novel method for the point-in-polygon test is proposed in this paper, capable of handling simple polygons in arbitrary shapes, possibly with holes. In the preprocess of the method, the edges of the polygon are classified into layers according to the occlusion relations between the edges viewed orthogonally in a direction, called the test direction, which guarantees that the edges of a layer can be occluded by only the edges of its preceding layers. At the same time, the edges at each layer are queued up respectively along the direction vertical to the test direction because there is no occlusion relation between the edges of the same layer. As a result, based on the layers, the calculation of the segments by the line through the tested point to intersect the polygon along the test direction, and then the inclusion test of the point against the segments could be feasibly made. The method has a low storage requirement in O(n), here, n is the number of the edges of the polygon. The time complexity of its preprocess ranges from O(n) to O(n^2), depending on the polygon shape and the test direction. And its inclusion test has a time complexity between O(log(n)) and O(n), but less than O((log(n))^2) in most cases, depending on the construction of the layers. In the case of convex polygons and monotone polygons, the time complexity for the preprocess and the inclusion test could be O(n) and O(log(n)), respectively. On the other hand, the method is also easy to integrate with a variety of existing methods such as ray crossing methods and grid-based methods for improving the inclusion test further. Experimental results show that the method is robust and efficient in computation.