Practical Point-in-Polygon Tests Using CSG Representations of Polygons

  • Authors:
  • Robert J. Walker;Jack Snoeyink

  • Affiliations:
  • -;-

  • Venue:
  • ALENEX '99 Selected papers from the International Workshop on Algorithm Engineering and Experimentation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

We investigate the use of a constructive solid geometry (CSG) representation in testing if a query point falls inside a polygon; in particular, we use a CSG tree whose leaves correspond to halfplanes defined by edges and whose internal nodes are intersections or unions of the regions defined by their subtrees. By preprocessing polygons into this representation, we obtain a linear-space data structure for point-in-polygon tests that has a tight inner loop that can prune unnecessary edge tests during evaluation. We experiment with opportunities to optimize the pruning by permuting children of nodes. The resulting test is less memory-intensive than grid methods and faster than existing one-shot methods. It also extends to ray-shooting in 3-space.