[Tutor] Point in polygon intro please~!
contact at endarion.com
Sat Oct 7 09:33:27 CEST 2006
Hello, I'm very new to both python and OpenGL, but I'm catching on
and trying to make a little game. I'm stuck on being able to do this
point-in-polygon test though.
Everyone seems to say that I should create a ray and see how many sides
of a polygon it intersects, (even vs odd)
but I have no idea how to go about setting this up.
I'm trying to have a 5-point polygon made from a list of trailing mouse
positions (len(mouselist)=5, obviously),
and checking to see if a bunch of points in a separate list
(len(pointlist)=20) ever fall within the resultant polygon.
The lists and program are all setup, but too large to copy here. It all
works by itself though, so I just need to
find out how to do this test.
Any help on how to set something like this up would be extremely
Thank you very much for your time,
More information about the Tutor