re point in polygon routine needed andrew lewis tepper at andrew cmu edu writes i don t know if this routine is standard i just came up with it recently for a polygon of points p pn and a point p make a table as follows t angle from p to p to p t angle from p to p to p t n angle from pn to p to p express all angles as pi angle pi add all entries in the table if the sum the point is outside if the sum is pi the point is inside if the point is xpi you have a strange polygon if any angle was pi the point is on the border i think it s known but it s neat can it be extended to d john nagle
