Theoretical and Practical Results on Straight Skeletons of Planar - - PowerPoint PPT Presentation

theoretical and practical results on straight skeletons
SMART_READER_LITE
LIVE PREVIEW

Theoretical and Practical Results on Straight Skeletons of Planar - - PowerPoint PPT Presentation

Theoretical and Practical Results on Straight Skeletons of Planar Straight-Line Graphs Stefan Huber Martin Held University of Salzburg Computer Science Department Salzburg, Austria Stefan Huber, Martin Held: Straight Skeletons of PSLGs 1 /


slide-1
SLIDE 1

Theoretical and Practical Results on Straight Skeletons

  • f Planar Straight-Line Graphs

Stefan Huber Martin Held

University of Salzburg Computer Science Department Salzburg, Austria

Stefan Huber, Martin Held: Straight Skeletons of PSLGs 1 / 24

slide-2
SLIDE 2

Straight skeleton of a PSLG G: Definition

◮ [Aichholzer and Aurenhammer, 1998]: self-parallel wavefront propagation.

◮ Topological events: Stefan Huber, Martin Held: Straight Skeletons of PSLGs Definitions 2 / 24

slide-3
SLIDE 3

Straight skeleton of a PSLG G: Definition

◮ [Aichholzer and Aurenhammer, 1998]: self-parallel wavefront propagation.

◮ Topological events: ◮ edge events ◮ split events

◮ Notation: wavefront W(G, t), straight skeleton S(G), arcs and faces

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Definitions 2 / 24

slide-4
SLIDE 4

Terrain model

◮ T (G) := t≥0 W(G, t) × {t} ◮ S(G) is the projection of valleys and ridges onto the ground plane. ◮ If one knows T (G) then one knows S(G), and vice versa.

valley ridge

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Definitions 3 / 24

slide-5
SLIDE 5

Prior work

Algorithms with sub-quadratic runtime:

◮ [Eppstein and Erickson, 1999]

O(n

17/11+ǫ) runtime, PSLGs as input, very complex, no implementation.

◮ [Cheng and Vigneron, 2007]

O(n√n log2 n) expected runtime, “non-degenerated” polygons with holes as input, no implementation.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Definitions 4 / 24

slide-6
SLIDE 6

Prior work

Algorithms with sub-quadratic runtime:

◮ [Eppstein and Erickson, 1999]

O(n

17/11+ǫ) runtime, PSLGs as input, very complex, no implementation.

◮ [Cheng and Vigneron, 2007]

O(n√n log2 n) expected runtime, “non-degenerated” polygons with holes as input, no implementation. Implementations:

◮ By F. Cacciola, shipped with CGAL, only polygons with holes, quadratic

runtime and memory footprint in practice.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Definitions 4 / 24

slide-7
SLIDE 7

Motorcycle graph

◮ Motorcycle: moving point, constant velocity. ◮ Trace: left behind each motorcycle. ◮ Crash: motorcycle reaches another’s trace. ◮ Introduced by [Eppstein and Erickson, 1999]. ◮ Used by [Cheng and Vigneron, 2007] for their straight-skeleton algorithm.

◮ Motorcycle graph induced by a simple non-degenerate polygon.

◮ Additionally: wall: solid straight-line segment.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Definitions 5 / 24

slide-8
SLIDE 8

Roadmap for a practical straight-skeleton algorithm

  • 1. Generalized motorcycle graph M(G) induced by an arbitrary PSLG G.

◮ [Cheng and Vigneron, 2007] excluded so-called vertex events. ◮ Basic requirement: M(G) should cover all reflex arcs of S(G).

  • 2. Exploit the geometric relation between M(G) and S(G) in order to come up

with a (practical) straight-skeleton algorithm.

Definition

A reflex arc of S(G) is traced out by a reflex wavefront vertex. Likewise for convex arcs.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 6 / 24

slide-9
SLIDE 9

Motorcycle graph induced by a PSLG

Ingredients of the motorcycle graph:

◮ Walls: each edge of G is a wall. ◮ Motorcycles:

◮ (a), (b): We launch a motorcycle at every reflex vertex v of W(G, 0).

(a) (b) v v e1 e2 m′

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 7 / 24

slide-10
SLIDE 10

Motorcycle graph induced by a PSLG

Ingredients of the motorcycle graph:

◮ Walls: each edge of G is a wall. ◮ Motorcycles:

◮ (a), (b): We launch a motorcycle at every reflex vertex v of W(G, 0). ◮ (c), (d): If m1, . . . , mk crash simultaneously at p such that a disk around p is

partitioned into a reflex and convex slices then we launch a new motorcycle m′ starting at p.

(a) (b) (c) (d) v v p p m1 mk mk m1 m′ m′ e1 e2 e2 e1 e1 e2 m′

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 7 / 24

slide-11
SLIDE 11

Motorcycle graph induced by a PSLG

We denote the resulting motorcycle graph by M(G).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 8 / 24

slide-12
SLIDE 12

Geometric relation between M(G) and S(G) Lemma

Consider a point p of M(G) which does not coincide with G. Then a local disk around p is tessellated into convex slices by M(G).

Theorem

The reflex arcs of S(G) are covered by M(G).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 9 / 24

slide-13
SLIDE 13

Alternative characterization of S(G)

◮ Define for every wavefront edge a 3D slab based on M(G).

e a b a′ b′ slab

Theorem

The lower envelope L(G) of these slabs is equal to T (G).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 10 / 24

slide-14
SLIDE 14

Alternative characterization of S(G)

◮ Define for every wavefront edge a 3D slab based on M(G).

e a b a′ b′ slab

Theorem

The lower envelope L(G) of these slabs is equal to T (G).

◮ Extends a result of [Eppstein and Erickson, 1999]. Their slabs are bounded

below by (tilted) reflex straight-skeleton arcs.

◮ Extends a result of [Cheng and Vigneron, 2007]. They considered simple

non-degenerated polygons as input.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Generalization of the motorcycle graph 10 / 24

slide-15
SLIDE 15

A wavefront-type algorithm

◮ M(G, t): those parts of M(G) which have not been swept by the wavefront

until time t.

◮ Extended wavefront W∗(G, t): the overlay of W(G, t) and M(G, t). ◮ We simulate the propagation of W∗(G, t).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 11 / 24

slide-16
SLIDE 16

Key properties of W∗(G, t) Corollary

Split events happen within the corresponding motorcycle traces and consequently within the extended wavefront W∗(G, t).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 12 / 24

slide-17
SLIDE 17

Key properties of W∗(G, t) Lemma

For any t ≥ 0 the set R2 \

t′∈[0,t] W∗(G, t′) consists of open convex faces.

Corollary

Only neighboring vertices can meet during the propagation of W∗(G, t).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 13 / 24

slide-18
SLIDE 18

Basic algorithm

Event: a topological change of W∗(G, t), i.e. an edge of W∗(G, t) collapsed to zero length.

Algorithm

  • 1. Compute the initial extended wavefront W∗(G, 0).
  • 2. Keep events in priority queue and process them in chronological order.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 14 / 24

slide-19
SLIDE 19

Algorithmic details: Types of events

start event split event multi split event switch event edge event

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 15 / 24

slide-20
SLIDE 20

Runtime complexity

◮ Switch events:

◮ A convex vertex does not meet a moving Steiner point twice. ◮ Hence, the number k of switch events is in O(nr), where r denotes the

number of reflex wavefront vertices.

◮ All other events can be processed in total O(n log n) time.

Theorem

If M(G) is given then our algorithm takes O((n + k) log n) time, where k is the number of switch events, with k ∈ O(nr).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 16 / 24

slide-21
SLIDE 21

Runtime complexity

◮ Switch events:

◮ A convex vertex does not meet a moving Steiner point twice. ◮ Hence, the number k of switch events is in O(nr), where r denotes the

number of reflex wavefront vertices.

◮ All other events can be processed in total O(n log n) time.

Theorem

If M(G) is given then our algorithm takes O((n + k) log n) time, where k is the number of switch events, with k ∈ O(nr).

◮ k ∈ O(n) for real word data, as confirmed by experiments. ◮ M(G) is computed by Moca [Huber and Held, 2011].

◮ O(n log n) runtime for practical input. Stefan Huber, Martin Held: Straight Skeletons of PSLGs Computing straight skeletons 16 / 24

slide-22
SLIDE 22

Experimental results: Implementation Bone

102 103 104 105 106 102 103 104 105 106 10−5 10−4 10−3 10−2 102 103 104 105 106 10−5 10−4 10−3 10−2 102 103 104 105 106

(a) Bone (c) CGAL, exact predicates (b) Bone, w/o runtime for M(G) (d) CGAL, inexact arithmetics

0.17 to 1.7 · n2 log n µs 10 to 30 · n log n µs 10 to 30 · n log n µs 0.05 to 0.5 · n2 log n µs runtime in sec. /n log n runtime in sec. /n log n

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Experiments 17 / 24

slide-23
SLIDE 23

Experimental results: Implementation Bone

Random polygons generated by RPG. Size n Bone CGAL MB factor MB factor 256 1.44 3.77 512 2.65 1.8x 13.4 3.5x 1 024 5.06 1.9x 51.1 3.8x 2 048 9.86 1.9x 201 3.9x 4 096 19.5 2.0x 792 3.9x 8 192 38.7 2.0x 3 197 4.0x 16 384 77.1 2.0x 12 600 3.9x

Table: Memory usage of Bone and CGAL

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Experiments 18 / 24

slide-24
SLIDE 24

Summary

◮ Theory:

◮ Generalized motorcycle graph to PSLGs. ◮ Extended important results of [Eppstein and Erickson, 1999] and

[Cheng and Vigneron, 2007].

◮ An application: straight skeleton algorithm using graphics hardware.

◮ Implementation Bone:

◮ Handles arbitrary PSLG as input. ◮ Promising experimental results show an O(n log n) runtime for practical input. ◮ By a linear factor faster and more space-efficient than CGAL.

Future work:

◮ Boost Bone to industrial strength. ◮ Employing MPFR (almost done). ◮ Employing CORE (in progress).

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Experiments 19 / 24

slide-25
SLIDE 25

Finish — any questions?

Figure: Terrain based on the straight skeleton of “SoCG 2o11”. Generated by Bone and rendered with the open-source modeling software Blender.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Experiments 20 / 24

slide-26
SLIDE 26

Bibliography I

Aichholzer, O. and Aurenhammer, F. (1998). Straight Skeletons for General Polygonal Figures in the Plane. In Samoilenko, A., editor, Voronoi’s Impact on Modern Science, Book 2, pages 7–21. Institute of Mathematics of the National Academy of Sciences of Ukraine, Kiev, Ukraine. Cheng, S.-W. and Vigneron, A. (2007). Motorcycle Graphs and Straight Skeletons. Algorithmica, 47:159–182. Eppstein, D. and Erickson, J. (1999). Raising Roofs, Crashing Cycles, and Playing Pool: Applications of a Data Structure for Finding Pairwise Interactions. Discrete Comput. Geom., 22(4):569–592. Huber, S. and Held, M. (2011). Motorcycle Graphs: Stochastic Properties Motivate an Efficient Yet Simple Implementation. ACM J. Experimental Algorithmics.

Stefan Huber, Martin Held: Straight Skeletons of PSLGs Experiments 21 / 24

slide-27
SLIDE 27

Appendix

Stefan Huber, Martin Held: Straight Skeletons of PSLGs 22 / 24

slide-28
SLIDE 28

Algorithmic details: types of events

u v u v (a) edge event (b) split event u u v v (c) start event u u v v v u v u v u v u (d) switch event u1 ul u v u1 ul v1 vl (e) multi start event u1 ul u (f) multi split event e e e e e e e e1 el wl wr w e′ e′ e′′ e′ e′ e′′ u2 u2 v2 e e

Stefan Huber, Martin Held: Straight Skeletons of PSLGs 23 / 24

slide-29
SLIDE 29

Worst-case runtime complexity

Ω(n) convex vertices Ω(n) moving Steiner vertices

Stefan Huber, Martin Held: Straight Skeletons of PSLGs 24 / 24