For Educators · Point in Polygon
Point in Polygon for a coastline
Built for educators teaching it to a class. Drop a live demo into a lecture or assign it as a shareable link — no lab installs. Simulate a coastline live below — adjust the inputs and watch it respond, right in your browser.
Point in Polygon (Geofence)Live
ray-casting containment
Controls
Is a point inside a shape? The ray-casting algorithm shoots a ray from the point in any direction and counts how many polygon edges it crosses: an odd number means inside, an even number means outside. It is the math behind geofencing — triggering an alert when a phone or vehicle enters or leaves a region — and behind hit-testing in graphics. Drag the point, or click anywhere to move it there.
Data Inspector
LocationINSIDE
Polygon vertices6
Algorithmray casting
Governing equation
Reading this result: A ray fired from this point crosses the polygon boundary an odd number of times, so the point lies inside the region — a geofence here would fire.
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
Also for:StudentsResearchersEngineersHobbyists & MakersK-12 StudentsFirst RespondersGeneral version →
More with Point in Polygon
Frequently asked questions
- Is this good for educators?
- Yes — this version of "Point in Polygon for a coastline" is framed for educators teaching it to a class. Drop a live demo into a lecture or assign it as a shareable link — no lab installs.
- Do I need to install anything?
- No. It runs in any modern browser, free, with no account required.