A method for the decision of a point whether in or not in polygon and self-intersected polygon

In this paper a new method is proposed to decide whether a point is in a simple polygon and a self-intersected polygon. A ray is rejected from the test point. According to the position between the edges of polygon and the ray, we define a position function of edges as to the ray, and then count the sum of the position function of all edges. We can decide whether the point is in the simple polygon and the self-intersected polygon by the sum. This method not only applies for simple polygon, but also for self-intersected polygon. Experiment result indicates that this method is simple, robust and fast.