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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
Didier Badouel. An efficient ray-polygon intersection. In Andrew S. Glassner, editor, Graphics Gems, pages 390–393. Academic Press, Boston, MA, 1990.
B. Bollig and I. Wegener. Improving the variable ordering of OBDDs is NP-complete. IEEE Transactions on Computers, 45(9):993–1002, 1996.
Randal E. Bryant. Graph-based algorithms for Boolean function manipulation. IEEE Transactions on Computers, C-35(6):677–691, August 1986.
Randal E. Bryant. Symbolic Boolean manipulation with ordered binary-decision diagrams. ACM Computing Surveys, 24(3):293–318, September 1992.
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.
Chris Green. Simple, fast triangle intersection. Ray Tracing News, 6(1), 1993. ftp://ftp.princeton.edu/pub/Graphics/RTNews.
R. Hacker. Certification of algorithm 112: position of point relative to polygon. Communications of the ACM, 5:606, 1962.
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.
Franco P. Preparata and Micheal Ian Shamos. Computational Geometry: An Introduction. Springer-Verlag, Berlin, Germany, 1985.
M. Shimrat. Algorithm 112: position of point relative to polygon. Communications of the ACM, 5:434, 1962.
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.
John Spackman. Simple, fast triangle intersection, part II. Ray Tracing News, 6(2), 1993. ftp://ftp.princeton.edu/pub/Graphics/RTNews.
Jorge Stolfi. Oriented Projective Geometry: A Framework for Geometric Computations. Academic Press, 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
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. https://doi.org/10.1007/3-540-48518-X_7
Download citation
DOI: https://doi.org/10.1007/3-540-48518-X_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66227-3
Online ISBN: 978-3-540-48518-6
eBook Packages: Springer Book Archive