The collection of convex subsets of a vector space has the following properties:
|
Hence, any two points outside a Jordan curve will intersect even number of times, and two pointer , one is outside and other inside will intersect the curve odd number of times (see figure (a), and (b)).
Consider the following problem. Given a simple closed Jordan polygon curve, determine if the interior region enclosed by the curve is convex. This problem can be readily solved solved by observing that if line segment defined by all pairs of vertices of the polygon curve, , where denotes the total number of vertices, lie totally inside the region, then the region is convex.
This would yield a straight algorithm with time complexity , as there are line segments, and to test if each line segment lies totally in the region takes time by comparing it against every polynomial segment.
It may be noted that the interior angle of each vertex must be strictly less than , in order for the region to be convex. If it is more than it is reflex. It may be noted that all the vertices must be convex, is the necessar condition for the region to be convex.