Next: Trees
Up: Monotonicity Issues
Previous: Monotonicity Issues
Let's adopt a new convention: Now consider the whole polygon P, it is monotonic with respect to
Theorem: Given a polygonal chain P, one can determine in O(nlogn) time all the directions with respect to which P is monotonic.
Let's consider the intersection of all the Hi
The intersection is an associative operator, so it is equivalent to write it as
The term in parentheses on the left is an intersection of n/2 half-planes, and hence
is a convex polygonal region of at most n/2 sides. The same is true for the term on the right.
Since the intersection of two convex polygons can be performed in O(k) time, where k is the side
of each the polygon, the previous intersection can be computed in O(n) time.
This suggests the following recursive algorithm:
T(n) = 2T(n/2) + O(n) = O(nlog(n)).
If P is monotonic with respect to d then v1 (first vertex of P) is a minimum for
P with respect to d.
For example, if we consider the line segment [ab],
a is minimum for all directions d with d.ab>0.
Is P monotonic in some direction?
Let Hi be the half-space determined by {x | Ox.vivi+1>0} (where O is the origin).
The set of all directions, for which P is monotonic, is described by the intersection between D and S,
where D is the intersection of the Hi over all i, and S is the unit sphere that represents all directions in space (the sphere of directions).
Therefore we can tell P's monotonicity by checking if D is non-empty, which could be done in linear time using linear programming.
How to compute all the directions with respect to which P is monotonic?
As noted above, the intersection of D and S describes the set of all the directions from which P is monotonic. The computational complexity is determined by the computing of D (the intersection of the half-spaces Hi). It could be done in O(nlog(n)) time by the following method [3]:
If T(n) denotes the time used to form the intersection of n half-planes by this algorithm, we have:
Contact us :
Jean HERBIERE and Yueyun SHU