Computing Straight Skeletons of Planar Straight-Line Graphs Based on - - PowerPoint PPT Presentation

computing straight skeletons of planar straight line
SMART_READER_LITE
LIVE PREVIEW

Computing Straight Skeletons of Planar Straight-Line Graphs Based on - - PowerPoint PPT Presentation

Computing Straight Skeletons of Planar Straight-Line Graphs Based on Motorcycle Graphs CCCG2010, Winnipeg, Canada Stefan Huber Martin Held Universit at Salzburg, Austria August 11, 2010 Stefan Huber, Martin Held Straight Skeletons of a


slide-1
SLIDE 1

Computing Straight Skeletons of Planar Straight-Line Graphs Based on Motorcycle Graphs

CCCG2010, Winnipeg, Canada Stefan Huber Martin Held

Universit¨ at Salzburg, Austria

August 11, 2010

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-2
SLIDE 2

Straight skeleton of a simple polygon

Aichholzer et alii [1995]: straight skeleton of simple polygons. Similar to Voronoi diagram, but consists only of straight-line segments.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-3
SLIDE 3

Straight skeleton of a simple polygon

Aichholzer et alii [1995]: straight skeleton of simple polygons. Similar to Voronoi diagram, but consists only of straight-line segments. Self-parallel wavefront propagation process.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-4
SLIDE 4

Straight skeleton of a simple polygon

Aichholzer et alii [1995]: straight skeleton of simple polygons. Similar to Voronoi diagram, but consists only of straight-line segments. Self-parallel wavefront propagation process. Topological changes:

edge events

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-5
SLIDE 5

Straight skeleton of a simple polygon

Aichholzer et alii [1995]: straight skeleton of simple polygons. Similar to Voronoi diagram, but consists only of straight-line segments. Self-parallel wavefront propagation process. Topological changes:

edge events split events

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-6
SLIDE 6

Straight skeleton of planar straight-line graphs

Aichholzer and Aurenhammer [1998]: generalization to planar straight-line graphs.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-7
SLIDE 7

Status quo

Consider a planar straight-line graph with n vertices as input. No vertex shall be isolated. Algorithms with sub-quadratic runtime: Eppstein & Erickson, O(n

17/11+ǫ) runtime. Very complex, no

implementation known. Algorithms capable for implementation: Aichholzer & Aurenhammer, O(n3 log n) runtime. Easy to

  • implement. In general, seems to be fast for many input datasets.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-8
SLIDE 8

Status quo

Consider a planar straight-line graph with n vertices as input. No vertex shall be isolated. Algorithms with sub-quadratic runtime: Eppstein & Erickson, O(n

17/11+ǫ) runtime. Very complex, no

implementation known. Algorithms capable for implementation: Aichholzer & Aurenhammer, O(n3 log n) runtime. Easy to

  • implement. In general, seems to be fast for many input datasets.

Our contribution Worst-case runtime of O(n2 log n). Easy to implement. Experiments show an actual O(n log n) runtime in practice.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-9
SLIDE 9

Motorcycle graph

A motorcycle is a point moving constantly on a straight line and leaves a trace behind. A motorcycle stops (crashes) when reaching the trace of another motorcycle. The arrangement of the traces is called motorcycle graph. Addition: motorcycles may also crash against solid straight-line segments (walls). Introduced by Eppstein & Erickson as the essential sub problem of straight skeletons. Used by Cheng & Vigneron to compute straight skeletons of “non-degenerated” polygons with holes in O(n√n log2 n) time.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-10
SLIDE 10

Motorcycle graph on the PSLG

Input graph denoted by G. Consider some time ǫ such that no event happened so far.

wavefront WF(G, ǫ) at time ǫ. reflex vertex convex vertex

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-11
SLIDE 11

Motorcycle graph on the PSLG

Input graph denoted by G. Consider some time ǫ such that no event happened so far. For a vertex v of the wavefront, v(t) denotes position of v at time t. For every reflex vertex v of W(G, ǫ) we define a motorcycle starting at v(0) and with speed vector (v(ǫ)−v(0))/ǫ. Further, consider the edges of G as walls.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-12
SLIDE 12

Motorcycle graph on the PSLG

We denote the resulting motorcycle graph by M(G). Assumption We adopt the assumption of Cheng & Vigneron: No two motorcycles crash simultaneously at a common location.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-13
SLIDE 13

Computing the straight skeleton

We denote by M(G, t) those parts of M(G) which have not been swept by the wavefront until time t. Let W∗(G, t) denote the overlay of W(G, t) and M(G, t). Simulating the propagation of W(G, t) in the straight-forward manner is inefficient. (Split events.) We simulate the propagation of W∗(G, t) instead.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-14
SLIDE 14

Basic properties

Theorem (Cheng & Vigneron) Reflex straight skeleton arcs are shorter than the corresponding motorcycle traces. 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 a PSLGs Based on Motorcycle Graphs

slide-15
SLIDE 15

Basic properties

Lemma For any t ≥ 0 the set R2 \

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

faces. Corollary During the propagation of W∗(G, t) only neighboring vertices can meet.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-16
SLIDE 16

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

Compute for every edge of W∗(G, 0) the collapsing time t. If t ∈ (0, ∞) then insert the corresponding event into a priority queue Q.

3

Fetch the earliest event of Q. Process the event, i.e. maintain W∗(G, t) and possibly insert new events into Q. Repeat until Q is empty.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-17
SLIDE 17

Algorithmic details: types of vertices

We distinguish the following types of vertices:

moving Steiner vertex resting Steiner vertex convex vertex reflex vertex

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-18
SLIDE 18

Algorithmic details: Types of events

(Classical) edge event: two convex vertices meet

u v

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-19
SLIDE 19

Algorithmic details: Types of events

(Classical) edge event: two convex vertices meet (Classical) split event: a reflex and a moving Steiner vertex meet

u v l r

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-20
SLIDE 20

Algorithmic details: Types of events

(Classical) edge event: two convex vertices meet (Classical) split event: a reflex and a moving Steiner vertex meet Start event: a reflex or a moving Steiner vertex u meets a resting Steiner vertex v. The vertex v becomes a moving Steiner vertex.

u v u v u v u v

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-21
SLIDE 21

Algorithmic details: Types of events

(Classical) edge event: two convex vertices meet (Classical) split event: a reflex and a moving Steiner vertex meet Start event: a reflex or a moving Steiner vertex u meets a resting Steiner vertex v. The vertex v becomes a moving Steiner vertex. Switch event: a convex vertex u meets a reflex or a moving Steiner vertex v. The vertex u migrates to a neighboring convex face. If v was a reflex vertex then it becomes a moving Seiner vertex.

u v v u u v v u

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-22
SLIDE 22

Runtime complexity

Assume the motorcycle graph of M(G) is given. Every vertex in W∗(G, t) has degree at most three. Hence every event is processed in O(log n) time. Edge, split and start events occur in total Θ(n) times and hence consume O(n log n) time. A convex vertex does not meet a moving Steiner point twice. Hence, the number k of switch events is in O(n2). Lemma If M(G) is given our algorithm takes O((n + k) log n) time, where k is the number of switch events, with k ∈ O(n2). For practical input it seams unlikely that more than O(n) switch events occur, as confirmed by experiments. A worst-case example can be constructed.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-23
SLIDE 23

Runtime complexity

Computing the motorcycle graph M(G): Priority queue enhanced straight-forward algorithm takes O(n2 log n) time. Sub-quadratic algorithms are given by Eppstein & Erickson and Cheng & Vigneron. Our implementation Moca has an average runtime of O(n log n).

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-24
SLIDE 24

Experimental results

Implemented in C++. M(G) is computed by our code Moca. 3 100 datasets of different flavors. Total runtime, including the computation of M(G):

1e-05 2e-05 3e-05 4e-05 5e-05 6e-05 100 1000 10000 100000 1e+06 Number n of input vertices Runtime in sec. / n log n

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-25
SLIDE 25

Experimental results

Implemented in C++. M(G) is computed by our code Moca. 3 100 datasets of different flavors. Runtime for the computation of S(G) only, excluding the computation of M(G):

1e-05 2e-05 3e-05 4e-05 5e-05 6e-05 100 1000 10000 100000 1e+06 Number n of input vertices Runtime in sec. / n log n

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-26
SLIDE 26

Conclusion

Summary: Handles PSLG as input. Easy to implement, with a worst-case runtime of O(n2 log n) instead

  • f O(n3 log n).

Promising experimental results showing an O(n log n) runtime for practical input. Future work: Getting rid of the assumption of Cheng & Vigneron: Implementation done, missing theoretical work in progress.

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-27
SLIDE 27

Appendix

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs

slide-28
SLIDE 28

Worst-case runtime complexity

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

Stefan Huber, Martin Held Straight Skeletons of a PSLGs Based on Motorcycle Graphs