Overview
Point in Polygon methods often cast a ray from the point and count how many polygon edges it crosses.
Tests whether a point lies inside a polygon.
Compact metadata for implementation and discovery.
Point in Polygon methods often cast a ray from the point and count how many polygon edges it crosses.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(1)
inside = crossing_count mod 2 == 1Classifies a point by whether a ray crosses polygon edges an odd number of times.
Show a ray from the point crossing polygon edges.
Boundary handling should be specified as part of the predicate's contract.
What each reference supports for this entry.
Computational geometry reference for convex hulls, point location, triangulations, and geometric predicates.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Geometry · Specialized
Kirkpatrick Point Location and Point in Polygon are practical alternatives within planar point location, with different assumptions and tradeoffs.
Compare with thisGeometry · Core
Ear clipping checks whether candidate ears contain other polygon vertices.
Compare with thisRendering · Foundation
Ray crossing tests for point-in-polygon are conceptually similar to ray intersection counts.
Compare with thisPoint-in-polygon tests often intersect a ray with polygon edges.
Ray crossing tests for point-in-polygon are conceptually similar to ray intersection counts.