Weighted Straight Skeletons In The Plane

We investigate weighted straight skeletons from a geometric, graph-theoretical, and combinatorial point of view. We start with a thorough definition and shed light on some ambiguity issues in the procedural definition. We investigate the geometry, combinatorics, and topology of faces and the roof model, and we discuss in which cases a weighted straight skeleton is connected. Finally, we show that the weighted straight skeleton of even a simple polygon may be non-planar and may contain cycles, and we discuss under which restrictions on the weights and/or the input polygon the weighted straight skeleton still behaves similar to its unweighted counterpart. In particular, we obtain a non-procedural description and a linear-time construction algorithm for the straight skeleton of strictly convex polygons with arbitrary weights.


Introduction
The straight-skeleton S(P ) of a simple polygon P is a skeleton structure that was introduced by Aichholzer et al. [1] to computational geometry about 20 years ago. 1 Its definition is based on a wavefront propagation process where the polygons edges move inwards with unit speed. The straight skeleton, roughly speaking, is the skeleton structure that results from the interference patterns of the wavefront edges. Aichholzer and Aurenhammer [2] later generalized the definition to planar straight-line graphs. Since their introduction a lot of applications appeared in different research areas and multiple algorithms to compute the straight skeleton are known [8].
Eppstein and Erickson [6] were the first to mention the weighted straight skeleton where the wavefront edges may move with arbitrary but fixed speed. They claim that their algorithm to compute the unweighted straight skeleton in O(n 8 /5+ ) time and space also works, without major changes, for weighted straight skeletons. Weighted straight skeletons have many applications: Barequet et al. [5] use weighted straight skeletons in order to define the initial wavefront topology for straight skeletons of polyhedra. Haunert and Sester [7] use the weighted straight skeleton for topology-preserving area collapsing in geographic maps. Laycock and Day [11] and Kelly and Wonka [10] use weighted straight skeletons to model realistic roofs of houses. Aurenhammer [4] investigated fixed-share decompositions of convex polygons using weighted straight skeletons with specific positive weights.
Although algorithms, applications and even simple implementations [9] of weighted straight skeletons were published, only limited research was conducted on the weighted straight skeleton per se. The only known results are that the simple definition based on wavefront propagation may lead to ambiguities [10,8] and that the lower envelope characterization by Eppstein and Erickson [6] does not apply. In this paper, we carefully define weighted straight skeletons, shed light on the ambiguity in the procedural definition, investigate geometric, graph-theoretical and combinatorial properties of weighted straight skeletons, and compare those with properties of unweighted straight skeletons. In particular, we show that weighted straight skeletons of simple polygons may have cycles and crossings. Furthermore, we investigate necessary conditions for the weights such that the straight skeleton of a simple polygon is a planar tree.

Preliminaries
The definition of the straight skeleton S(P ) of a simple polygon P is based on a so-called wavefront propagation of P where all edges of P move inwards in parallel and with unit speed. The wavefront, denoted by W P (t), for small t has the shape of a mitered offset-curve of P . As t increases, W P changes its topology. Such a change is called an event: An edge event happens if an edge e collapsed to zero length and vanishes. A split event happens when a reflex wavefront vertex reaches a wavefront edge e and splits the edge into parts. Either event causes local changes in the topology of the wavefront.
The straight skeleton S(P ) is defined by set of loci traced out by the vertices of W P (t) for all t ≥ 0, see Fig. 1. Additionally, some loci are added to the straight skeleton in case of parallel edges as follows: (a) If two parallel edge e, e that move in opposite direction become overlapping during a split event, then the region common to e and e is added to the straight skeleton, while the region(s) that belongs to exactly one of them remains in the wavefront. (b) If two parallel edges e, e that move in the same direction become adjacent during an edge event, then their common endpoint is considered a vertex of the wavefront. We call this a ghost vertex, which moves perpendicular to e and e . 2 Each wavefront vertex traces out an arc of S(P ). As wavefront vertices move along bisectors of edges of P , the arcs of S(P ) are straight-line segments. Every event of W P belongs to a locus where arcs of S(P ) meet and give rise to a node of S(P ). See Figure 1 for an example. The straight skeleton S(P ) is interpreted as a graph, and one can show that it is a tree [1]. Also, no two arcs of the straight skeleton cross since the wavefront moves inwards towards the unswept region. Hence S(P ) ∪ P is a planar straight-line graph. The inner faces of S(P )∪P are called straight-skeleton faces.
For a polygon edge e, let the wavefront fragments of e at time t, denoted e(t), be the union of segments of W P (t) that originated from e; set e(t) may comprise none, one, or many segments depending on whether e participated in edge events and/or split events. We consider segments in e(t) to be open line segments. Define f (e) := t>0 e(t) to be the face of edge e ; this is the region that was swept by e during the propagation. One can easily show that the faces of wavefront-edges are in 1-1-correspondence with the straight-skeleton faces. Also, f (e) is monotone with respect to the line through e [1,2], and its lower chain is convex [8]. Furthermore, the boundary of each face f (e) corresponds to a cycle in P ∪ S(P ). 3

Roof models
Aichholzer et al. [1] introduced the roof model, which is a handy way of interpreting the straight skeleton. 2 One could also argue for omitting ghost vertices, hence effectively merging e and e into one edge of the wavefront. But then, even in the unweighted case, the straight skeleton is not always connected. 3 Aichholzer and Aurenhammer [2] extended the definition of straight skeletons to planar straight line graphs. Then some arcs are rays to infinity. We consider such arcs to meet at a node located at infinity. Thus, the property even holds in this case. Figure 2: The definition of straight skeletons is ambiguous when two parallel wavefront edges with different weights become adjacent.
One considers the wavefront propagation embedded in three-space where the z-axis constitutes time. Then W P traces out a surface, namely the roof model T (P ) := t≥0 W P (t) × {t}. Note that we can obtain S(P ) from T (P ) by projecting the edges of T (P ) onto the plane R 2 × {0}. Vice versa, we can obtain T (P ) from S(P ) by lifting all nodes of S(P ) by their orthogonal distance to the respective input edges of P (i.e., the time when they were swept by the wavefront). In other words, T (P ) gives us the means to investigate W P over its entire lifespan.
The roof model is sometimes also called terrain model, since T (P ) is a terrain, i.e., any line parallel to the z-axis intersects it in at most one point. As this property may be violated for the weighted version of straight skeletons, we prefer the term "roof model".

Weighted straight skeletons
The weighted straight skeleton differs from the straight skeleton only in the speed σ(e) ∈ R \ {0} with which edge e moves in the wavefront. We call σ the weight function and σ(e) the weight of e. The wavefront moves such that the fragments e(t) of e at time t are on the line e + σ(e) · n(e), where e is the line through e, and n(e) is the inward normal of e. We note that σ(e) is not necessarily positive; for σ(e) < 0 edge e moves outward with speed |σ(e)|. 4 All other definitions that we gave for (unweighted) straight skeletons, such as edge event, split event, W P (t), S(P ), e(t), f (e), T (P ) carry over verbatim to the weighted straight skeleton. (We use an additional parameter σ in the names of these objects when we want to emphasize that we are discussing the weighted version.) The only exception to the "carrying over verbatim" is the change of topology during an edge event; here there exists one ambiguity that we discuss in detail in Section 3. While the definitions carry over, it is not at all clear which of the properties of the straight skeleton (such as planarity, tree, f (e) is monotone, f (e) corresponds to faces) carries over to the weighted version. This is the main topic of the paper, and will be discussed in Section 4.

Ambiguity of definition
Presume that we have an edge event where edge e 2 disappears, leaving its adjacent edges e 1 and e 3 to become adjacent with common endpoint v. See Fig. 2. Some elementary computation shows that if γ is the angle spanned by e 1 and e 3 (on the side that the wavefront propagates to), and α 1 is the angle between e 1 and the arc traced by v, then However, this equation only holds for sin(γ) = 0, i.e., if e 1 and e 3 are not parallel. Worse, as γ monotonically approaches π, we may obtain two different limit cases: see Fig. 2. Hence, as already alluded to by Kelly and Wonka [10] and Huber [8], the definition of the weighted straight skeleton is ambiguous whenever parallel wavefront edges with different weights are adjacent. In case σ(e 1 ) = σ(e 3 ) and γ = π, we obtain lim γ→π cot α 1 = 0 by de l'Hôpital's rule, and hence α 1 = π/2. Similarly α 1 = π/2 if σ(e 1 ) = −σ(e 3 ) and γ = 0. But in all other cases, there is no unique definition of a straight skeleton. Note that the situation can become even more complicated if multiple parallel wavefront edges with different weights become consecutive, as in Fig. 3.
We see a few canonical ways to resolve this situation: • The wavefront edge(s) with maximum speed dominate all involved events.
• The wavefront edge(s) with maximum absolute speed dominate all involved events. In case of a tie (e.g. one edge has speed +1, another one has speed −1, and all others have speed in [−1, +1]) the inward-moving edge(s) win.
• The wavefront edge(s) with maximum absolute speed dominate all involved events. In case of a tie the outward-moving edge(s) win.
• Three more options are as above with "maximum" replaced by "minimum".
We will describe the first resolution in more detail, the others are similar. Assume (as in Fig. 3) that at some time line contains part of the wavefront; say a maximal contiguous part of the wavefront on consists of vertices and edges v 0 , e 1 , v 1 , . . . , e m , v m (in order). Also assume for now that e 1 , . . . , e m all approach from the same half-plane. Let e i1 , . . . , e i k be those edges among them that maximize σ(e ij ). We create, for j = 1, . . . , k − 1, a ghost vertex w ij halfway between v ij and v ij+1−1 .
Then replace the wavefront between v 0 and v m by edges , edges e i1 , . . . , e i k "take over" all other edges in this part of the wavefront. Edges e i1 , . . . , e i k continue to propagate (they all had the same speed), while all other edges in e 1 , . . . , e m disappear.
If not all edges on approach from the same halfplane, then any non-empty line segment that is common to two edges in opposite direction becomes an arc of the weighted straight skeleton. We otherwise proceed as above: the edge(s) with the maximum speed "take over" all other adjacent edges of the wavefront that reside on .

Properties of the straight skeletons
In what follows, we will assume there never are two parallel edges of different weights that become consecutive during an edge event. Under this assumption the weighted straight skeleton is uniquely defined. But as we show now, even then many seemingly natural properties do not hold. Table 1 lists all results.
Lemma 1 There exists a simple polygon P with weights chosen from {+1, −1}, such that S(P, σ) has crossings and cycles.
Proof. The polygon is shown in Fig. 4.

Terrains and crossings
We now want to show that if the weights are positive, then the straight skeleton has no crossing. For this (and other claims later) it will help to study when the roof model T (P, σ) is a terrain.  Lemma 2 Let P be a polygon (possibly with holes). If σ(e) > 0 for all wavefront edges e, then the roof model T (P, σ) is a terrain and its z-projection equals P .
Proof. Because the weights are all positive, the wavefront edges emanated by P move towards the interior of P . After each event of W P,σ the trajectories of the newly born wavefront vertices hence point to the area within P not yet swept by the wavefront. Hence, no wavefront vertex can ever reach a locus that has already been swept as this vertex would have met another wavefront edge before that and the vertex would have been annihilated. Therefore the wavefront W P,σ stays within P and no locus of P is swept more than once by the wavefront. On the other hand, each locus of P is swept at least once, since otherwise the boundary of the unswept region would be the wavefront, and hence not empty yet.
Lemma 3 There exists a simple polygon such that if all edges are assigned weights in {+1, −1}, T (P, σ) is not a terrain.
Proof. The example shown in Fig. 4 contains loci that are swept more than once and hence T (P, σ) is not a terrain. In fact, it can be easily extended such that some loci are swept an arbitrary number of times.
Lemma 4 Let P be a polygon (possibly with holes). If σ(e) > 0 for all wavefront edges e, then S(P, σ) has no crossings.
Proof. This holds by Lemma 2, since the locus p of any crossing must have been covered at least twice by the wavefront. But then the line parallel to the z-axis through p would intersect T (P, σ) twice.

Faces of edges
We later want to argue that under some assumptions the straight skeleton is connected. To do so, we first study some properties of the faces of edges. Recall that f (e) = Proof. Polygon P is shown in Fig. 5 (include the dotted features), with edge e the bottommost horizontal edge. During the wavefront process, edge e gets split when it meets the hole. But since e moves faster than the edges of the hole, two fragments of e later re-combine. According to our definition of straight skeleton, a ghost vertex is created that traces the arc a in Fig. 5. The boundary of f (e), viewed as a polygon, contains arc a twice and is not simple.
Lemma 5 used a polygon with holes. Whether for simple polygons a similar situation can arise depends on whether the weights are positive or not.
Lemma 6 Let P be a simple polygon and σ be an assignment of positive weights to the edges of P . Then bd f (e) is a simple polygon for all wavefront-edges e.
Proof. (Sketch) Note that f (e) is an open, simplyconnected set: whenever a fragment splits, the pieces never re-merge due to the ghost-vertices. Hence bd f (e) is a weakly simple polygon, and the only way that it could be not simple is by having a point p that is incident to three or more edges of the boundary of f (e), see Fig. 5. This can only happen if two fragments s 1 , s 2 in e(t) become adjacent in the wavefront. By tracing from s 1 and s 2 back to e while residing inside f (e), we can find a closed Jordan curve C inside cl f (e) that encloses a point outside cl f (e).
For positive weights the roof model T (P ) projects to P (Lemma 2), so C ⊂ cl f (e) ⊂ P . Since P is simple, any point inside C also belongs to P . Since some point inside C does not belong to cl f (e), therefore some other face f (e ) is inside C. But by planarity (Lemma 4) then the edge e of this face is inside C as well. Since C contains no edges of P , therefore edge e cannot be connected to the edges at the exterior face of P along edges of P . So P has a hole, a contradiction.
Lemma 7 There exists a simple polygon P with weights chosen from {−1, +1, +3} such that bd f (e) is not a simple polygon for an edge e of P .
Proof. The polygon is shown in Fig. 6.
If the polygon is simple and all weights are the same, then bd f (e) is simple, because f (e) is monotone with respect to the line through e [1]. We note here that f (e) need not be monotone if we allow weights. This is already obvious from Fig. 5 and 6, but may happen even for simple polygons and positive weights.

Connectivity
The unweighted straight skeleton S(P ) of a polygon P with holes is always connected. In fact, S(P ) is even of the same homotopy type as P . The weighted straight skeleton, however, need not even be connected.
Lemma 9 There exists a polygon P with holes such that S(P, σ) is not connected.
Proof. If all weights are negative then S(P, σ) resides in each component of R 2 \ P .
The following lemma serves as a tool to prove connectedness in the following. The lemma basically says that straight-skeleton features that are connected via the wavefront at any time are also connected within the final straight skeleton.
Lemma 10 Let S t (P, σ) denote the straight-skeleton features traced by W P until time t. If two points p, q ∈ S t (P, σ) are path-connected on S t (P, σ) ∪ W P,σ (t) then they are path-connected on S(P, σ).
Proof. We prove this lemma by induction on the events of W P in chronological order. We need to check that connectivity is maintained despite the changes of W P caused by an event. An event may simply remove a collapsed edge of W P (t) (edge event), remove a collapsed component of W P (t) (edge event), split a component of W P (t) (split event), or merge components (split event). In any case a straight-skeleton node v is created to which arcs are incident that were traced by the vertices of each involved component of the wavefront. However, even if the wavefront is split into multiple components, each components remains connected to v by at least one arc that is traced by a vertex of each component. That is, an event never disconnects a component from the node that is created by the event. 5 Lemma 11 S(P, σ) is connected for simple polygons P .
Proof. This holds even for negative weights as the initial wavefront of P consists of only one connected component. (Recall that infinite arcs are incident to a node at infinity.) Lemma 12 S(P, σ) is connected for polygons with holes P and positive weights.
Proof. Consider the wavefront emanating from some hole. At some point, it either merges with some other wavefront during a split event; then the claim holds by induction (and Lemma 11) since W P,σ then has fewer components. Or it collapses during an edge event. But this is impossible, since for positive weights the wavefront of the hole moves towards the inside of P and hence encloses ever more area.

Bounds on the edges
It is well-known that for simple polygons, the straight skeleton is a tree. It is not hard to verify that for positive weights, also the weighted straight skeleton is a tree. We show an even stronger statement, which bounds the number of edges even in the presence of holes.
Lemma 13 Let P be a polygon with h holes, and let σ be an assignment of positive weights to the edges of P . Then S(P ) has n(S(P )) + h − 1 arcs, where n(S(P )) is the number of nodes of S(P ) plus the number of vertices of P .
Proof. By Lemma 2, T (P, σ) is a terrain that projects to P . Denote by P the polyhedron that is enclosed by T (P ) and T (P ) mirrored at the plane z = 0. Observe that P is z-monotone as T (P ) is z-monotone and its z-projection is P . Hence P has exactly one handle for each hole of P , so the genus of P is h.
Let n(P ) (n(P), resp.) be the number of vertices of P (P, resp.) and m(P ) (m(P), m(S(P )), resp.) be the number of edges/arcs of P (P, S(P ), resp.). We have n(P) = 2n(S) − n and m(P) = 2m(S) + n. Also note that the number f (P) of faces of P is 2m(P ) = 2n(P ), since every edge of P gives rise to one face of the roof model, and hence two faces of P.

Conclusion
In this paper, we studied properties of weighted straight skeletons, and shows that many seemingly natural properties do not necessarily hold for it, especially if negative weights are allowed. Hence caution must be used when applying weighted straight skeletons. We suspect that many of the applications have a special situation (e.g. convex polygons [4] or weights defined in a special way [5]) that imply that weighted straight skeletons behave "just like" the unweighted ones, but this remains a topic for future study.