Point in Polygon

Ray-casting point-in-polygon test

List the vertices in order as x,y pairs, e.g. 0,0, 6,0, 6,4, 0,4

Ray casting: cast a ray from the point — odd edge crossings ⇒ inside, even ⇒ outside
Classification
Inside
Ray crossings
1
Vertices
4
Polygon area
24
Point in PolygonPoint (2, 3) — Inside. Ray crossings: 1.

关于这个计算器

The Point in Polygon Calculator tests whether a point lies inside, outside, or on the boundary of any polygon using the ray-casting (even–odd) algorithm. It handles convex and concave polygons, detects points exactly on an edge or vertex, and visualizes the ray and its edge crossings.

常见示例

  • Square 0,0 6,0 6,4 0,4 with point (2,3) → inside (1 crossing)
  • Square 0,0 6,0 6,4 0,4 with point (10,3) → outside (0 crossings)
  • Point (6,2) on the right edge of that square → on boundary
  • L-shape 0,0 4,0 4,2 2,2 2,4 0,4 with point (3,3) → outside (in the notch)