[CST-1b] DSA 98.3.5

Kevin Chan kkfc2@cam.ac.uk
Wed, 17 May 2000 12:29:45 +0100


This is the algorithm where you draw a line from infinity (i.e. outside the
polygon) to the point which you want to test.  You then count how many
intersections there are with the edges of the polygon.  If there is an odd
no. of intersections then the point lies within the polygon else it is
outside.  Problems may arise if line you have draw from infinity to the
point you are testing intersects a vertex of the polygon as it counts it as
only one intersection instead of two (I think) and hence you are outside
when you think you are inside and vice versa.

This was definately covered in lectures though not in too much detail

Hope this makes sense

Kev