Skip to main content
2 of 6
added 83 characters in body
kglr
  • 403.4k
  • 18
  • 501
  • 959

How to check if a 2D point is in a polygon?

Background: I use code from this Wolfram Demonstration to check if a point ( mouse pointer ) is in a ( convex ) polygon. Clearly this code fails for non-convex polygons.

Question: I am looking for an efficient routine to check if a 2D-point is in a polygon.

nilo de roock
  • 9.7k
  • 3
  • 36
  • 81