A reliable test for inclusion of a point in a polygon

  • Authors:
  • Jerome L. Lewis

  • Affiliations:
  • University of South Carolina at Spartanburg, Spartanburg, South Carolina

  • Venue:
  • ACM SIGCSE Bulletin
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper takes a careful look at a well-known implementation of an algorithm that tests a point in the plane for inclusion in a given polygon. The implementation, coded in C++, appears in Robert Sedgewick's highly regarded book, Algorithms in C++, and has a number of flaws associated with special cases. The paper discusses the problems and a reliable implementation of the algorithm is developed.