Polygon : It is a closed circuit which is made up of many line segments . It is 2dimentional geometric figure. As per name poly means many , a 2D shape having three or more than 3 sides.
Types of Polygon
1.Simple polygon : There is no sides which are intersecting each other.
2 .Complex polygon : In Complex polygon lines intersect each other.
Inside test : It tells whether the point is inside the polygon or outside the polygon.
Odd Even Test
If the no. of intersecting points is odd then the point lies inside the polygon. If the no. of intersecting points is even then the point lies outside the polygon.
First we take a point and check the no. of intersecting point in any one direction.
In this figure (I) no. of intersecting points=3 (odd) ,so point is inside the polygon.
In the figure(III) points A and B both are in same direction ,consider it as even. let 2 and 1 another intersecting point 2+1=3(odd) . point is inside the polygon.
In figure (IV) points A and B both are the opposite direction , consider it as odd . let 1 and another 1 intersecting point 1 so 1+1=2(even). point is outside the polygon.