Literature DB >> 25648376

A simple algorithm for computing positively weighted straight skeletons of monotone polygons.

Therese Biedl1, Martin Held2, Stefan Huber3, Dominik Kaaser2, Peter Palfrader2.   

Abstract

We study the characteristics of straight skeletons of monotone polygonal chains and use them to devise an algorithm for computing positively weighted straight skeletons of monotone polygons. Our algorithm runs in [Formula: see text] time and [Formula: see text] space, where n denotes the number of vertices of the polygon.

Entities:  

Keywords:  Computational geometry; Lower envelope; Monotone polygon; Weighted straight skeleton

Year:  2015        PMID: 25648376      PMCID: PMC4308025          DOI: 10.1016/j.ipl.2014.09.021

Source DB:  PubMed          Journal:  Inf Process Lett        ISSN: 0020-0190            Impact factor:   0.959


Introduction

The straight skeleton of a simple polygon was introduced by Aichholzer et al. [1] and is defined by considering the propagation of a so-called wavefront. Each edge of emits a wavefront-edge moving at unit speed towards the polygon's interior in a self-parallel manner. During this propagation process, the topology of the wavefront changes due to self-interaction: (i) In an edge event an edge of the wavefront shrinks to zero length and thus vanishes. (ii) A split event happens when a vertex of the wavefront moves into the interior of a non-incident wavefront edge. (iii) For input that is not in general position even more complex interactions such as vertex-events or multi-split-events are possible [2], [3]. The straight skeleton is the union of the traces of wavefront vertices over the entire time of the wavefront propagation, see Fig. 1.
Fig. 1

The straight skeleton of an input polygon (bold) is the union of the traces of wavefront vertices. For different points in time the wavefronts are shown in gray.

The straight skeleton of an input polygon (bold) is the union of the traces of wavefront vertices. For different points in time the wavefronts are shown in gray. The weighted version of the straight skeleton, where edges no longer move at unit speed, was first mentioned by Eppstein and Erickson [2] and studied in detail by Biedl et al. [4], [5]. Several algorithms are known for constructing unweighted straight skeletons, such as those by Aichholzer et al. [1], Eppstein and Erickson [2], Cheng and Vigneron [6], Huber and Held [3], or Vigneron and Yan [7]. Das et al. [8] suggested an algorithm for constructing the (unweighted) straight skeleton of monotone polygons, which they claim runs in time, where n denotes the number of vertices of the polygon. However, we have simple examples that show that their Lemmas 5, 6, and 7 do not hold for all valid inputs. In particular, their approach hinges upon the assumption that no event introduces a new reflex vertex during the wavefront propagation process, which is clearly incorrect for general input. (See the node marked in green in Fig. 2, on the right-hand side of the lower chain.) Note that a perturbation of the input in order to avoid such a vertex event, as suggested by Das et al. [8], cannot be applied as the straight skeleton changes discontinuously [2].
Fig. 2

The straight skeleton of a strictly monotone input polygon results from the merge of the straight skeletons and of the top and bottom chain – is shown dotted. The merge chain is shown in bold and dotted.

The straight skeleton of a strictly monotone input polygon results from the merge of the straight skeletons and of the top and bottom chain – is shown dotted. The merge chain is shown in bold and dotted. Our algorithm can compute the positively weighted straight skeleton of a monotone polygon in time and space, which constitutes a significant improvement over the worst-case time and space complexity of the currently best algorithm for arbitrary simple polygons by Eppstein and Erickson [2]. (The algorithm by Vigneron and Yan [7] achieves an expected time complexity but is only applicable if no multi-split events occur.) Furthermore, our algorithm does not require complex data structures and is easy to implement.

Strictly monotone polygonal chains

Let be a polygonal chain strictly monotone with respect to the x-axis. We construct as a chain consisting of the same line segments as except that we extend the first and the last segment to rays to the west () and the east (), respectively. Thus, partitions the plane into an upper and lower portion. In the following we continue to call such an unbounded chain a polygonal chain. We start by considering the unweighted wavefront propagation of where all edges of emanate a self-parallel wavefront edge towards , which we call the south. (We discuss extensions to positive weights and non-strict monotonicity later on.) We denote the wavefront at time t by . For the initial wavefront, at , the chains and are geometrically identical. Again, the first and last segments are rays to infinity. For small values of t and prior to the first event, the edges of are in one-to-one correspondence to the edges of and occur in the same order. We denote by the area swept by the wavefront until time t. The roof model is a three-dimensional structure: We assign to every point of the time when it was swept by the wavefront. The resulting structure is a terrain; it helps us in studying the wavefront over its entire propagation period. The wavefront of a strictly x-monotone chain is a strictly x-monotone chain for all times t. Furthermore, every change in the topology of the wavefront is witnessed by an edge collapsing to zero length. We will show this claim by induction: The monotonicity of is unaffected by the southwards propagation at least as long as its topology does not change. Since the initial wavefront is identical to , which is strictly x-monotone, it follows that is also strictly x-monotone for sufficiently small t such that no event has happened yet. The topology of can only change as a result of the wavefront interacting with itself, when vertices of become incident to other elements of which they were previously not incident to. Assume that at a certain point in the propagation process a vertex v becomes incident to either a different vertex or to an edge e that it was not previously incident to. If prior to the change the wavefront was a strictly monotone polygonal chain, then it follows that the only way that v could have become incident to or e is for all segments between v and or e to have shrunk to zero length. Segments that shrink to zero length in an event are removed from the wavefront. Removing one or more such collapsed segments of a strictly x-monotone chain and then connecting the remaining pieces together yields a strictly x-monotone chain again. Therefore, each event is witnessed by an edge collapse and it transforms one strictly x-monotone wavefront into another strictly x-monotone wavefront, resulting in being strictly x-monotone for all times t.  □ Note that we say that each change is witnessed by an edge collapse instead of an edge event. We do this in order to also include non-elementary changes of the wavefront, such as vertex events. The straight skeleton of a strictly monotone polygonal chain can be computed in time , where n is the number of edges of . We maintain a priority queue to keep track of the edge collapses, which witness all topological changes. The total number of propagating wavefront edges initially is n. We can compute the initial collapse times of all these edges in time and fill a priority queue in total time. We keep fetching the next edge collapse from the priority queue. We have to re-compute the collapse times of the two incident edges and adapt their entries in the priority queue in time. Collapse times of other edges are not affected by such a change. Note that the number of wavefront edges decreases with each event because no split events occur. Since all topological changes of the wavefront are witnessed by such edge collapses (Lemma 1), no event is missed. Therefore, we can construct the straight skeleton in total time.  □ Each wavefront edge of has area already swept by the wavefront to its immediate north and unswept area to its south. The part of the plane that has already been swept, , lies between and . Since is strictly x-monotone, each element of has swept area to its north and unswept area to its south.  □ Let be the roof of a strictly monotone chain that emanated a wavefront southwards. Then, on any point on the surface of , the elevation of the roof increases when moving due south. This holds for each individual face of because of Lemma 3. Since the roof is continuous, it also holds when moving between faces.  □

Strictly monotone polygons

To compute the unweighted straight skeleton of a strictly monotone polygon , which we assume to be monotone with respect to the x-axis, we split into two chains, the northern or top (upper) chain and the southern or bottom chain . The common western and eastern vertices are denoted by and , respectively. Both chains of emanate their wavefronts inwards, that is, emanates its wavefront southwards, northwards. We compute the straight skeleton and roof for both chains independently and denote these by , , , . Let be a polygonal chain in . We say is strictly 3D-monotone with respect to the x-axis if every plane parallel to the yz-plane intersects in at most one point. Letbe a polygonal chain inthat is strictly 3D-monotone with respect to the x-axis. Then projecting onto the xy-plane yields a polygonal chain that is strictly x-monotone. Let h be an arbitrary line in the xy-plane orthogonal to the x-axis (i.e., parallel to the y-axis). To establish that is x-monotone, we need to show that h intersects in at most one point. Let H be a plane parallel to the yz-plane such that h lies within H. By assumption, H intersects in at most one point. Thus, the projection of onto the xy-plane intersects h in at most one point.  □ The two roofsandintersect in a polygonal chaininthat is strictly 3D-monotone with respect to the x-axis. This merge chain starts in and ends in . Monotonicity of the merge chain follows from Lemma 4: Let Π be an arbitrary plane parallel to the yz-plane that intersects in and in . If Π intersects the polygon then is the southern intersection and the northern intersection of Π and . The intersection of Π with is a piecewise linear terrain function in Π that starts at point , where , and strictly monotonically increases its z-coordinate as the y-coordinate increases towards . Similarly, the intersection of Π with is a strictly monotonically decreasing function starting at and positively infinite z-coordinate and ending at point where . Two such functions coincide in exactly one point if is north of , as is the case if Π intersects the polygon. If the intersection of Π and is empty, then is north of and the two terrain functions do not intersect at all. Therefore, is strictly 3D-monotone with respect to the x-axis. Vertices and are the start and end points of the chain because they are the common vertices of both chains. Since both roofs consist of planar faces, the intersection consists of line segments.  □ In the merge step, we construct a new polyhedron by stitching together the faces of between and and the faces of between and . Note that this polyhedron is a terrain above the interior of and its intersection with the xy-plane is equal to . Furthermore, is piecewise-linear and continuous and each face is incident to one edge of . It remains to show that this roof is equivalent to the straight-skeleton induced roof of . All edges introduced by our merge step, i.e., the edges of , are ridges in , not valleys. Each edge e of is incident to one face of the northern roof on its north side, and incident to one face of the southern roof to its south. By Lemma 4, is sloping downwards towards north, and is sloping downwards towards south. Thus, e is a ridge.  □ Let be the roof constructed by merging and as described. Then is the roof induced by . In the following we will only consider the roof above . Note that is the unique lower envelope of and . Let denote the roof induced by . We need to show that also is the lower envelope of and . As is a tree, there is a unique path between and . This is exactly the path that separates the union of faces incident to and the union of faces incident to . Hence, comprises exactly the straight-skeleton arcs that have faces of different chains on either side. From that it follows that is x-monotone. We build vertical slabs above the edges of , resulting in the intersection with . All straight-skeleton nodes of south of originate from topological changes within . Hence, their lifted counterparts in coincide with vertices of . Likewise, every vertex in south of has its counterpart as a node of south of . In other words, and coincide south of . With the same argument, and coincide north of . In particular, . Finally, we observe that every path on from strictly to the north or the south is descending. On the other hand, a path on to the south is ascending. The same is true for paths on to the north. Hence, is indeed the lower envelope of and .  □ Fig. 2 illustrates the merge by showing a polygon and its straight skeleton as well as the straight skeleton of the bottom chain . Projecting onto the xy-plane yields the straight skeleton of the input polygon .

Computing the merge chain

We construct the intersection of the northern and southern roofs. The roofs and intersections that appear in this problem have special properties, and we can, thus, find in time. Since in the end we are only interested in the projection of onto the xy-plane, we only construct this projection in 2D. The three-dimensional chain can be extracted from by raising each vertex by its orthogonal distance to the edges defining its incident faces. Let consist of the edges , in order from west to east, and of the edges . Furthermore, let consist of vertices and edges . We construct incrementally, starting at and adding line segments until we reach . At each step in the process we keep track of the faces of and that lies in. We denote these faces by and . Note that lies on the bisector of the input edges defining and since traces the intersection of the northern and southern roofs. The initial merge segment starts at . The northern and southern faces are and , where denotes the face incident to edge e in the corresponding straight skeleton. The supporting line of will intersect arcs of and in loci other than . Let be the intersection east of that minimizes the length of the edge . Assume was the intersection of the supporting line of with an arc a of the northern straight skeleton . We set the northern face to be the other face incident to a. The southern face does not change and thus . Should the intersection have occurred for an arc of the southern face, we set and accordingly. The next segment, , then lies on the bisector of the input edges defining and . This segment starts in and we determine the next vertex in turn. Since the segments of always lie between the northern and southern chain, and since is monotone, this process will, eventually, end up in and we will have completed the merge chain.

Complexity considerations

In order to quickly find the next intersection of with an arc of either and we compute trapezoidations of and by adding vertical line segments as required. In the incremental step, when we are looking for , i.e., the eastern vertex of , we can use the trapezoidations of both and to find : We sweep through the cells from west to east until we find one where the supporting line of intersects an arc on a cell's boundary, thus finding . During that switch we enter a new face in either the northern or the southern straight skeleton and we start anew. When searching for in this next step, we no longer need to consider the cells that we already visited. At every stage we intersect with the boundary of the currently active northern and southern cells to either find or to move forward in one of the trapezoidations. We can charge each such set of intersection tests to the one cell we move out of. The number of total trapezoidation cells is linear in the input size, and, therefore, given a trapezoidation, the complete merge step can be achieved in time linear in the input size. A plane sweep allows to compute the trapezoidation of a planar straight-line graph such as in time, where n is the size of the input graph. Since the size of the straight skeleton is linear in its input, the total cost of creating both trapezoidations therefore also is in . By Theorem 2, the northern and southern straight skeletons can be found in time, and they can also be merged in time. Therefore, the unweighted straight skeleton of a strictly monotone polygon can be computed in time. Obviously, all data structures require space linear in the input size.

Positively weighted straight skeleton

We now consider a wavefront propagation where not all edges move at the same speed. Recently Biedl et al. [4] showed that many of the seemingly obvious properties of straight skeletons no longer hold when weights are not unit weights. Therefore, diligent consideration is required when extending existing proofs to weighted straight skeletons.

Monotone chains

None of the proofs of any statement leading up to and including Theorem 2 used the fact that wavefront edges move at unit speed or any properties which depend on unit speeds. Thus, Theorem 2 still holds and the positively weighted straight skeleton and roof of a polygonal chain can be computed in time. Since we consider only positive weights, the wavefront of a strictly monotone chain still propagates southwards everywhere. Thus, Lemma 3 and Lemma 4 still hold, and the straight-skeleton induced roof is still a terrain.

Monotone polygons

For strictly monotone polygons the positively weighted straight skeleton can also be constructed in the way described in Sections 3 and 4. Since Lemma 4 still holds, the intersection of the northern and southern roofs again produces a 3D-x-monotone polygonal chain that consists of ridges only. Therefore, Lemma 6, Lemma 7 also hold for positively weighted input. Biedl et al. [4] showed that for simple polygons and positive weights the straight skeleton is still a tree. Thus, Theorem 8 still applies and therefore also Corollary 9. Hence, our algorithm is also correct for positively weighted straight skeletons.

Discussion

We presented an algorithm that computes the positively weighted straight skeleton of a strictly monotone polygon in time and linear space. The restriction to strict monotonicity makes several proofs easier and more readable but can be waived. The obvious problem when dealing with a polygon which, after suitable rotation, is monotone but not strictly monotone relative to the x-axis is that moving due northwards or southwards in and does no longer guarantee that the elevation increases or decreases, respectively. Furthermore, the merge chain need no longer be strictly monotonous. We refrain from adding clumsy new proofs to extend our lemmas to this special case. Rather, we content ourselves with noting that suitable subdivisions of the top and bottom chains (in order to isolate edges parallel to the y-axis within individual chains) followed by suitable (small) rotations allow to obtain the properties claimed by our lemmas locally for the individual pieces of the chains, their roofs, and the final merge chain . Thus, our algorithm can be extended to polygons that are monotone but not strictly monotone, without sacrificing its performance. An extension of our approach to negative weights seems much more demanding since several important properties are lost. For instance, the roof of a monotone polygonal chain need not be a terrain once negative weights are allowed. For our approach to still work we would need to establish that the northern and southern roofs nevertheless still only intersect in a single, unique merge chain. Note that this merge chain need no longer be monotone, might include vertices at infinity, and its projection onto the xy-plane might self-intersect. The straight skeleton of a monotone polygon might contain cycles, and even for a convex polygon it may be self-intersecting [4].
  1 in total

1.  Weighted straight skeletons in the plane.

Authors:  Therese Biedl; Martin Held; Stefan Huber; Dominik Kaaser; Peter Palfrader
Journal:  Comput Geom       Date:  2015-02       Impact factor: 0.537

  1 in total
  1 in total

1.  A Straight Skeleton Based Connectivity Restoration Strategy in the Presence of Obstacles for WSNs.

Authors:  Xiaoding Wang; Li Xu; Shuming Zhou
Journal:  Sensors (Basel)       Date:  2017-10-10       Impact factor: 3.576

  1 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.