To find a point inside a polygon

Skip Montanaro skip at mojam.com
Wed Jan 26 11:19:32 EST 2000


    David> Does anyone know if any python implementation for finding whether
    David> a point is inside a polygon? E.g., by giving a point(x,y) and an
    David> array of polygon's points (x0,y0,x1,y1,x2,y2,...), it returns
    David> true or false to tell if the given (x,y) is inside the polygon.

I think this has been asked before.  If not, check the comp.graphics FAQ for
a description of the algorithm and code one up in Python.  It's not
difficult.

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098




More information about the Python-list mailing list