# Analytical Solution for the Problem of Point Location in Arbitrary Planar Domains
## 2 Related Work
### Winding Number Based Approaches
If, on the other hand, the two regions are taken as a degenerate self-intersecting polygon where the common edge is actually a double edge, it will be demonstrated further that \(a\) belongs naturally to the compound region (\(R_{1}\cup R_{2}\)), independently of the circulation sense. As mentioned earlier, when the testing point is over the boundary, the winding number approach has a variable behavior, depending on the circulation sense, which can be illustrated with this simple example based on a triangle with vertices \(p_{1}=(-1,0)\), \(p_{2}=(0,-1)\), \(p_{3}=(0,1)\) and a test point \(a=(0,0)\). For the triangle longer segment, we have \(\vec{u}=p_{1}-(0,0)\) and \(\vec{v}=p_{2}-(0,0)\). Also, \(\vec{u}\times\vec{v}=1\times 1\times\sin(\pi)=0\) and \(\vec{u}\cdot\vec{v}=1\times 1\times\cos(\pi)=-1\), and consequently \(\alpha=\text{atan}2(0,-1)=\pi\). If we swap \(p_{1}\) with \(p_{2}\), which is equivalent to reversing the circulation sense, the result is the same for this segment (because it still holds \(\alpha_{12}=+\pi\)), which indicates that the approach does not distinguish the sense of circulation (winding number contribution) along a segment when the point is over it. But, for the remainder two segments, the winding number contribution is detected accordingly in different values and, therefore, the overall winding number changes! In conclusion, there are cases where the point will be considered inside and others outside the polygon, depending on the circulation sense. Figure 6 shows the elements that provide a simple example demonstrating this situation, which is occasionally mentioned by some authors, but also usually dismissed as irrelevant or avoided with specific argumentation, such as in [4]. Figure 5: Example of two adjacent regions \(R_{1}\) and \(R_{2}\) where point \(a\) lies precisely on the border, raising the question to which region it belongs. Figure 6: Example of the behavior of the winding number technique for a point on the border, \(a=(0,0)\), of a triangle when the circulation sense is reversed (the order \(p_{1}\to p_{2}\to p_{3}\to p_{1}\) is always assumed). For the inclusion of \(a\), the sum of the three angles is expected to be \(\sum\alpha_{ij}=\pm 2\pi\), which does not occur on the right (clockwise circulation sense) because \(\alpha_{12}=+\pi\), causing a net \(\sum\alpha_{ij}=0\). For the sake of clarity, auxiliary vectors \(\vec{u}\) and \(\vec{v}\) (from Equation (1)) are shown only for the first oriented segment (\(p_{1}\to p_{2}\)). Although apparently inconvenient and potentially unexplainable (the sense of circulation was not expected to determine the conclusion of the point inclusion test), this behavior is actually predicted by the Jordan curve theorem. Indeed, an important concept related to the problem of point location is the well-known Jordan curve theorem (JCT) that, in a simple redaction, as is done in [20], states that \"Every Jordan curve (a non-self-intersecting continuous loop in the plane) separates the plane into exactly two components\". This means that any point is either in one region or in the other, and implicitly, there is no distinct third region, like, for example, \"the border\". So, formally, any results derived from the JCT, namely those based on the winding number, may find ambiguity in assessing which of the two regions is the point lying on the boundary, and this is an unavoidable fact that must be managed when using techniques based on circulation or winding number. Actually, for simple curves, when the observer is traveling along the curve counter-clockwise, the points on this curve (boundary), by convention, will belong to the region on the left hand side; so, the identification of which is the \"inside\" region depends on the traveling (circulation) sense of the observer, and this is where the ambiguity may take place.