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

  • Robert J. Walker
  • Jack Snoeyink
Conference paper

DOI: 10.1007/3-540-48518-X_7

Part of the Lecture Notes in Computer Science book series (LNCS, volume 1619)
Cite this paper as:
Walker R.J., Snoeyink J. (1999) Practical Point-in-Polygon Tests Using CSG Representations of Polygons. In: Goodrich M.T., McGeoch C.C. (eds) Algorithm Engineering and Experimentation. ALENEX 1999. Lecture Notes in Computer Science, vol 1619. Springer, Berlin, Heidelberg

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Robert J. Walker
    • 1
  • Jack Snoeyink
    • 1
  1. 1.UBC Dept. of Computer ScienceVancouverCanada

Personalised recommendations