/PointInPolygon

Improved algorithm for determining the inclusion of a point P in a 2D planar polygon. C/C++ implementation.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

The improvement of well known Crossing Number (cn) algorithm for determining the inclusion of a point P in a 2D planar polygon.

This implementation (i.e. function - is_inside_sm() ) is tested against standard Crossing Number (cn) algorithm and Winding Number (wn) algorithm.

Unlike standard implementations (cn and wn), this one WORKS ON EDGES, providing (at least) equally good execution speed. fast, faster...

(The Python implementation of the same algorithm is given here.)