Franklin's Point Inclusion in Polygon (PNPOLY) Algorithm

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration implements Franklin's point inclusion in polygon (PNPOLY) algorithm [1] that tests whether a point is inside a polygon (convex or concave). The idea, based on Jordan's curve theorem, is to count how many times a ray from the test point crosses an edge of the polygon. At each crossing, the status changes from inside to outside or vice versa.

Contributed by: Frederick Wu (October 2018)
Open content licensed under CC BY-NC-SA


Details

Reference

[1] W. R. Franklin. "PNPOLY - Point Inclusion in Polygon Test." (Oct 9, 2018) wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html.


Snapshots



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.
Send