point within a polygon?

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 basically its if the polygon is convex? I think thats the right descriptor

Well, your diagram was not clear ;(

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

Rob.

doh, the message board seems to have removed my spaces