Hey Stig, you made me doubt myself about sigma of angles adding to 360! You cheeky boy
Obviously was not 100% sure of myself
Thanks CarlB to believe in me! Seriously Stig, let us have a rectangle and label the bottom right corner 1, the top right 2, TL=3 and BL=4 and the radiating point is A and located below the bottom base of rectangle. Now, we have to accept the precept that the angle cannot be greater than 180 deg. It can be 180, meaning that A is precisely on the line connecting the points or less than 180! Each angle is to be tested if greater than 180. So, we have angle 1A2, 2A3, 3A4 and 4A1. The last one being larger than 180, we use alpha=360-4A1 where alpha is now clockwise [as AutoCAD works] while the others are CCW! If A is inside, angles add up to 360 if outside resulting in close to 0 for rounding off errors. I am not at the office yet but when there i'll post something with bpoly.
Since there was no more input from sub, it is hard to gear in the right direction! Is the polygon drawn using 3DPOLY, UCS with world, are there any object in the way that could confuse the ray method...
Serge