Elsevier

Computer-Aided Design

Volume 44, Issue 12, December 2012, Pages 1235-1252
Computer-Aided Design

Optimal uniformly monotone partitioning of polygons with holes

https://doi.org/10.1016/j.cad.2012.06.005Get rights and content

Abstract

Polygon partitioning is an important problem in computational geometry with a long history. In this paper we consider the problem of partitioning a polygon with holes into a minimum number of uniformly monotone components allowing arbitrary Steiner points. We call this the MUMC problem. We show that, given a polygon with n vertices and h holes and a scan direction, the MUMC problem relative to this direction can be solved in time O(nlogn+hlog3h). Our algorithm produces a compressed representation of the subdivision of size O(n), from which it is possible to extract either the entire decomposition or just the boundary of any desired component, in time proportional to the output size. When the scan direction is not given, the problem can be solved in time O(K(nlogn+hlog3h)), where K is the number of edges in the polygon’s visibility graph. Our approach is quite different from existing algorithms for monotone decomposition. We show that in O(nlogn) time the problem can be reduced to the problem of computing a maximum flow in a planar network of size O(h) with multiple sources and multiple sinks. The problem is then solved by applying any standard network flow algorithm to the resulting network. We also present a practical heuristic for reducing the number of Steiner points.

Highlights

► We show how to subdivide a polygon into a minimum number of uniformly monotone pieces. ► Our subdivision allows inclusion of Steiner points. ► We reduce the problem into one of finding maximum flow in a planar network.

Introduction

Subdividing a polygon into simpler polygonal components is a fundamental problem in computational geometry. Given a simple n-vertex polygon in the plane, the abstract problem is to subdivide the polygon’s interior into a collection of components of a certain type. Perhaps the simplest example is polygon triangulation [1], [2], which involves subdividing the polygon into triangles. Other examples include subdivisions into trapezoids [1], [3] and convex polygons [4]. Even for components of a given type, there may be variations in the problem’s formulation. For example, in some cases, the polygon may contain holes (that is, its boundary need not be simply connected), and sometimes additional vertices, called Steiner points, may be added as part of the decomposition. When Steiner points are allowed, there are two variants, boundary Steiner points, which may be added only along the polygon’s boundary (meaning that the subdivision is formed by adding chords joining two points on the polygon’s boundary) and arbitrary Steiner points, which may be placed anywhere. An excellent survey of the area can be found in [5].

Our focus will be on subdivisions that are called uniformly monotone. A polygonal chain is monotone with respect to a given direction, called the scan direction, if any line perpendicular to that direction intersects the chain in at most one point. A polygon is monotone with respect the scan direction if any line perpendicular to the scan direction intersects the polygon in at most one segment. A subdivision is monotone if each of its faces is a monotone polygon (possibly with respect to different scan directions). Such a subdivision is uniformly monotone if all of its components are monotone with respect to a common scan direction. (Formal definitions will be given in Section 2.) We consider the problem of decomposing a simple polygon into a minimum number of uniformly monotone components. We refer to this as the MUMC problem (minimum uniformly-monotone components). In our formulation the input polygon may contain holes, and we assume that (arbitrary) Steiner points are allowed. Uniformly monotone subdivisions are useful in a number of practical applications, including path planning [6] and in designing VLSI layouts [7].

The problem of monotone subdivision of polygonal objects has been well studied. If minimizing the number of components is not essential, it is known that in O(nlogn) time it is possible to decompose a polygon with holes into O(n) uniformly monotone components without the need for Steiner points [8], [9]. For the problem of minimizing the number of components, the complexity depends on whether holes are present, Steiner points are allowed, and whether the subdivision is required to be uniformly monotone. For the case of Steiner-free, nonuniform monotone decompositions, Keil [10] presented an O(Rn4) time algorithm for the hole-free case, where R is the number of reflex vertices (that is, vertices whose interior angle exceeds π). He also showed that the problem is NP-hard if the polygon has holes.

Liu and Ntafos [11] considered the MUMC problem for simple polygons without holes. They showed that, given the scan direction, it is possible to solve the Steiner-free MUMC problem in O(nlogn+nR+R3) time. Their approach was to reduce MUMC to the problem of computing a maximum set of independent chords in a circle graph, where each node of the graph is a scan reflex vertex of the polygon and each chord is a visibility edge connecting a pair of such vertices (see Section 2 for definitions). However, this approach is not feasible for a polygon with holes, since the computation of a maximum set of independent chords is equivalent to computing a maximum independent set in an undirected graph, which is NP-hard [11], [12].

They also presented an O((nlogn)R+R3) time algorithm for the variant where boundary Steiner points are allowed. These algorithms can be adapted to find the minimum decomposition over arbitrary directions by testing a finite number of judiciously chosen reference directions. Preparata and Supowit [13] showed that O(R) reference directions suffice to determine the monotonicity of a polygon with respect to arbitrary directions. Based on this, Liu and Ntafos [11] showed that no more than O(R2) scan directions need to be considered for solving MUMC over all possible directions. This implies that the MUMC problem for polygons without holes can be solved in time O((nlogn)R2+nR3+R5) for the Steiner-free case and in time O((nlogn)R3+R5) for the case of boundary Steiner points.

In spite of these results, which are over twenty years old, it is remarkable that the computational complexity of MUMC has not been resolved for polygons with holes when Steiner points are allowed. In this paper we show that, given a polygon with n total vertices and h holes and a scan direction, the MUMC problem for arbitrary Steiner points is solvable in O(nlogn+hlog3h) time. Because the number of Steiner points in an optimal solution may be as high as Ω(nR), this algorithm may actually run faster than the output size. This is possible because our algorithm produces a compressed representation of the subdivision of size O(n). From this representation, it is possible to extract the decomposition in time proportional to its total size. The following table summarizes the current best known results, including our results presented in this paper (see Table 1).

As with Liu and Ntafos, our algorithm assumes that the scan direction is given. To solve the general MUMC problem, we apply a result of Arkin et al. [14], which shows that it suffices to test O(K) reference directions, where K is the number of edges of the polygon’s visibility graph. This implies that the general problem can be solved in time O(K(nlogn+hlog3h)). These results are presented formally in Theorem 2 of Section 5.4.

Our computational approach is quite different from that of Liu and Ntafos, which is based on dynamic programming. Instead, we show that in O(nlogn) time the MUMC problem can be reduced to the problem of computing a maximum flow in a planar network with multiple sources and multiple sinks, such that the numbers of vertices and edges in this network are both O(h). The result, which may be of independent interest, is presented in Theorem 1 of Section 5.4. The problem is then solved by applying a network flow algorithm to the resulting network. In particular, we apply the network flow algorithm of Borradaile et al. [15].

The rest of the paper is organized as follows. In the next section, we present definitions and preliminary observations.

In Section 3, we show that the notion of independent chords in [11] can be extended by generalizing chords into polygonal paths cutting through the polygon. This allows us to reduce MUMC to the problem of computing a maximum matching in an appropriate bipartite graph. In Section 4 we extend this result by presenting a reduction from MUMC to computing maximum flows in a sparse network of size O(n). The network is essentially the dual graph of a modified trapezoidal map of the the polygon. In Section 5 we show how to reduce the size of the network to O(h). Although our algorithm minimizes the number of components, we make no effort to minimize the number of Steiner points. In Section 6 we present a discussion of a practical approach for reducing the number of Steiner points.

Section snippets

Preliminaries

We begin by defining some standard terms. A simple polygon is the region bounded by a simple, closed polygonal chain. We allow the polygon to contain disjoint holes in its interior, each of which is a simple polygon. A scan direction is a unit vector in the plane, and a line perpendicular to the scan direction is called a scan line. Given a scan direction, a simple polygon is monotone with respect to this direction if any scan line intersects the polygon in at most one line segment. Although

Minimum subdivisions and maximum matchings

In this section we demonstrate a connection between computing a minimum uniformly monotone subdivision of the polygon P and computing the maximum matching of a graph that encodes the monotone path structure within P. We have seen in Lemma 1 that it suffices to consider only subdivisions induced by independent eliminating sets. Each monotone chain appearing in such a set can eliminate at most two SRVs (one at each end). It follows directly that the number of chains needed in any optimal

Efficient construction by maximum flow

In this section and the next we present an alternate approach for solving the MUMC problem that is considerably more efficient than the approach described in the previous section. Rather than reducing the problem to computing a maximum matching in a potentially dense bipartite graph, we reduce the problem to computing a maximum flow in a sparse, planar graph. This approach has the nice feature that it provides a concise representation of the subdivision of size O(n). The results of the previous

Efficiently computing the maximum flow

In the previous section we showed how to reduce the MUMC problem to computing a maximum flow in a directed planar network, G, where the network is derived from the pseudo-trapezoidal map of P. The network’s size is proportional to R, the number of reflex vertices in P. In this section, we show that, through a collapsing process, it is possible to reduce this flow problem to one involving a planar network whose size is proportional the number of holes of P. Since the time needed to compute a

Final path fairing

While the results of the previous sections provide a minimum number of components, the price we pay is that the number of Steiner points may be quite large. Although there exist worst-case inputs in which any optimal solution involves a quadratic number of Steiner points (for example, a narrow zig–zagging polygon with many merge SRVs on one side and many split SRVs on the other), such cases are unlikely to arise in typical applications. This raises the question of whether it is possible reduce

Concluding remarks

We have resolved a longstanding open problem in the area of polygon decomposition, called MUMC, which involves computing the minimum number of uniformly monotone components (allowing arbitrary Steiner points). In contrast to most existing approaches to polygon decomposition, which have been based on dynamic programming, we show that the problem can be reduced to computing the maximum flow in a planar network with multiple sources and multiple sinks. Our approach is based on a novel collapsing

Acknowledgments

The second author’s part of this work was supported by GRF grant 614309. The third author’s work has been supported by the National Science Foundation under grant CCF-1117259 and the Office of Naval Research under grant N00014-08-1-1015.

References (19)

There are more references available in the full text version of this article.

Cited by (5)

View full text