Drag the query point. A horizontal ray counts edge crossings — odd = inside, even = outside.
Drag the purple point anywhere. Use Step to walk edges one at a time, or Run to animate.
| Method | Per query | Space |
|---|---|---|
| Ray casting (any polygon) | O(n) | O(1) |
| Winding number | O(n) | O(1) |
| Convex, binary search | O(log n) | O(n) |
| Trapezoidal map (many q) | O(log n) | O(n) |