PDA

View Full Version : point within a polygon?



neilw
11-17-2002, 11:51 PM
How can you determine if a point is inside a 4 sided polygon, when the shape of the polygon can be like so?

______________
\ /
\ /
\ /
| /
| /
| /
| /
| / | /
| /
|/

apologies for drawing but i think its clear http://www.opengl.org/discussion_boards/ubb/smile.gif basically its if the polygon is convex? I think thats the right descriptor

Rob Fletcher
11-18-2002, 01:03 AM
Well, your diagram was not clear ;(

however, check out ..
http://geometryalgorithms.com/algorithm_archive.htm

Rob.

neilw
11-18-2002, 01:13 AM
doh, the message board seems to have removed my spaces http://www.opengl.org/discussion_boards/ubb/frown.gif