ocmw.core.in_poly_funcs module

Functions for determining the relative position of a point to a line or polygon.

is_left

Test if a point is left/on/right of an infinite line

cn_PnPoly

Crossing number test for a point in a polygon

wn_PnPoly

Winding number test for a point in a polygon

Routines for performing the “point in polygon” inclusion tests.

Copyright 2001, softSurfer (www.softsurfer.com) This code may be freely used and modified for any purpose providing that this copyright notice is included with it. SoftSurfer makes no warranty for this code, and cannot be held liable for any real or imagined damage resulting from its use. Users of this code must verify correctness for their application.

translated to Python by Maciej Kalisiak <mac@dgp.toronto.edu>

a Point is represented as a tuple: (x,y)

ocmw.core.in_poly_funcs.is_left(P0, P1, P2)[source]

Test if a point is left/on/right of an infinite line

ocmw.core.in_poly_funcs.cn_PnPoly(P, V)[source]

Crossing number test for a point in a polygon

ocmw.core.in_poly_funcs.wn_PnPoly(P, V)[source]

Winding number test for a point in a polygon