re point within a polygon in article apr uk bull co uk scrowe hemel bull co uk simon crowe writes i am looking for an algorithm to determine if a given point is bound by a polygon does anyone have any such code or a reference to book containing information on the subject regards simon basically there are two algorithms determining whether a point is inside outside or on the polygon the first one is ray or half line method in this method you can draw any ray if the number of the intersection point of the ray and the polygon is even then it is outside if the number is odd then it is inside of cause you have to deal with the special cases which may make you headache the second method is pi algorithm draw the lines between the point and all the vertices on the polygon calculate and sum the angles of the successive lines if the result is pi then it is inside if pi then it is on the polygon otherwise it is outside my experience tells the second method is relible hope this helps yeh usc
