> just return the "Simple pointInPoly() test..."
> no return from point_inside_polygon(3,10,poly)
if __name__ == '__main__':
print 'Simple pointInPoly() test...'
poly = [(-1,-1), (6,-1), (5,6), (0,5)]
point_inside_polygon(3,10,poly)
-
You nee
This is why -
if __name__ == '__main__':
print 'Simple pointInPoly() test...'
poly = [(-1,-1), (6,-1), (5,6), (0,5)]
point_inside_polygon(3,10,poly)
And you were expecting to see a True/False as to whether or not the
point was inside the polygon right, as point_inside_polygon()
there is no error message but in the console
I just see Simple pointInPoly() test...
On 11/6/05, Liam Clarke <[EMAIL PROTECTED]> wrote:
> Shi,
>
> I've just seen 3 queries from you all along the lines of -
>
> why the following code does not work?
>
>
>
> If English is not your first language, I
Shi,
I've just seen 3 queries from you all along the lines of -
why the following code does not work?
If English is not your first language, I can understand you're not
going to write us a novel.
However, you'll get a better response if you copy and paste the error
message (the traceback) that
just return the
"Simple pointInPoly() test..."
no return from point_inside_polygon(3,10,poly)
On 11/6/05, Glen Wheeler <[EMAIL PROTECTED]> wrote:
> > why the following code does not work?
> > [snip script]
>
> Give us an error message, please.
> ___
> T
> why the following code does not work?
> [snip script]
Give us an error message, please.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
why the following code does not work?
# determine if a point is inside a given polygon or not
# Polygon is a list of (x,y) pairs.
def point_inside_polygon(x,y,poly):
n = len(poly)
inside =False
p1x,p1y = poly[0]
for i in range(n+1):
p2x,p2y = poly[i % n]
if y > m