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

  • Robert J. Walker
  • Jack Snoeyink
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1619)

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.

References

  1. 1.
    Franklin Antonio. Faster line segment intersection. In David Kirk, editor, Graphics Gems III, chapter 1.4, pages 199–202. Academic Press, Boston, MA, USA, 1992.Google Scholar
  2. 2.
    Didier Badouel. An efficient ray-polygon intersection. In Andrew S. Glassner, editor, Graphics Gems, pages 390–393. Academic Press, Boston, MA, 1990.Google Scholar
  3. 3.
    B. Bollig and I. Wegener. Improving the variable ordering of OBDDs is NP-complete. IEEE Transactions on Computers, 45(9):993–1002, 1996.MATHCrossRefGoogle Scholar
  4. 4.
    Randal E. Bryant. Graph-based algorithms for Boolean function manipulation. IEEE Transactions on Computers, C-35(6):677–691, August 1986.CrossRefGoogle Scholar
  5. 5.
    Randal E. Bryant. Symbolic Boolean manipulation with ordered binary-decision diagrams. ACM Computing Surveys, 24(3):293–318, September 1992.CrossRefGoogle Scholar
  6. 6.
    David Dobkin, Leonidas Guibas, John Hershberger, and Jack Snoeyink. An effcient algorithm for finding the CSG representation of a simple polygon. In John Dill, editor, Computer Graphics (SIGGRAPH’ 88 Proceedings), volume 22, pages 31–40, August 1988.Google Scholar
  7. 7.
    Chris Green. Simple, fast triangle intersection. Ray Tracing News, 6(1), 1993. ftp://ftp.princeton.edu/pub/Graphics/RTNews.
  8. 8.
    R. Hacker. Certification of algorithm 112: position of point relative to polygon. Communications of the ACM, 5:606, 1962.CrossRefGoogle Scholar
  9. 9.
    Eric Haines. Point in polygon strategies. In Paul S. Heckbert, editor, Graphics Gems IV, chapter 1.4, pages 24–46. Academic Press, Boston, MA, USA, 1994.Google Scholar
  10. 10.
    Franco P. Preparata and Micheal Ian Shamos. Computational Geometry: An Introduction. Springer-Verlag, Berlin, Germany, 1985.Google Scholar
  11. 11.
    M. Shimrat. Algorithm 112: position of point relative to polygon. Communications of the ACM, 5:434, 1962.CrossRefGoogle Scholar
  12. 12.
    John M. Snyder and Alan H. Barr. Ray tracing complex models containing surface tessellations. Computer Graphics (SIGGRAPH’ 87 Proceedings), 21(4):119–128, July 1987.CrossRefGoogle Scholar
  13. 13.
    John Spackman. Simple, fast triangle intersection, part II. Ray Tracing News, 6(2), 1993. ftp://ftp.princeton.edu/pub/Graphics/RTNews.
  14. 14.
    Jorge Stolfi. Oriented Projective Geometry: A Framework for Geometric Computations. Academic Press, 1991.Google Scholar

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