Simple Regions and Simple Curves
A region is simply connected if it has no holes in it, and a curve is simply connected if it does not cross or intersect itself. These definitions are illustrated below.
A region may fail to be simply connected because of a single point. For example a disk will fail to be simply connected if an interior point is removed. This is shown below.
If two points on the same side of a simple closed curve are joined, the curve will be crossed an even number of times or it will not be crossed at all (zero crossings, the minimum possible). Each time we cross the curve and then return to the original side, we add two crossings to the minimum count.
If two points on opposite sides of a simple closed curve are joined, the curve will be crossed an odd number of times. Here the minimum number of possible crossings is one. As before, each time we cross the curve and then return to the original side, we add two crossings to the minimum count.
These observations lead to a simple rule for finding out whether a point is inside or outside a simple closed curve maze. Join the point to an arbitrary point outside the curve (off the drawing) and count the number of times the connection crosses the curve. If the number of crossings is even, the two points lie on the same side of the curve, and the given point must lie outside the curve. If the number of crossings is odd, the two points lie on opposite sides of the curve, and the given point must lie inside the curve.
The count is not affected if the connection is tangent to or just touches the curve at any time.