On Computing Straight Skeletons by Means of Kinetic Triangulations - - PowerPoint PPT Presentation

on computing straight skeletons by means of kinetic
SMART_READER_LITE
LIVE PREVIEW

On Computing Straight Skeletons by Means of Kinetic Triangulations - - PowerPoint PPT Presentation

On Computing Straight Skeletons by Means of Kinetic Triangulations Peter Palfrader Martin Held Stefan Huber University of Salzburg European Symposium on Algorithms 2012 Problem Given a planar, straight line graph, construct the straight


slide-1
SLIDE 1

On Computing Straight Skeletons by Means

  • f Kinetic Triangulations

Peter Palfrader Martin Held Stefan Huber

University of Salzburg

European Symposium on Algorithms 2012

slide-2
SLIDE 2

Problem

Given a planar, straight line graph, construct the straight skeleton.

slide-3
SLIDE 3

Defining Straight Skeletons

  • Introduced by Aichholzer et al. in 1995.
  • A skeleton consisting exclusively of straight line segments.
  • Defined by a wavefront propagation process: The straight

skeleton is the set of loci that are traced out by wavefront vertices.

slide-4
SLIDE 4

Defining Straight Skeletons

  • Introduced by Aichholzer et al. in 1995.
  • A skeleton consisting exclusively of straight line segments.
  • Defined by a wavefront propagation process: The straight

skeleton is the set of loci that are traced out by wavefront vertices.

slide-5
SLIDE 5

Defining Straight Skeletons

  • Introduced by Aichholzer et al. in 1995.
  • A skeleton consisting exclusively of straight line segments.
  • Defined by a wavefront propagation process: The straight

skeleton is the set of loci that are traced out by wavefront vertices.

slide-6
SLIDE 6

Wavefront propagation

During this wavefront propagation, the wavefront topology changes:

  • Split events: a wavefront vertex crashes into an oncoming

wavefront edge.

  • Edge events: a wavefront edge vanishes.
slide-7
SLIDE 7

Defining Straight Skeletons

Extend from simple polygons to planar straight line graphs:

slide-8
SLIDE 8

Defining Straight Skeletons

Extend from simple polygons to planar straight line graphs:

slide-9
SLIDE 9

Applications

Tool path generation Roof construction ✂ Cut-and-fold

and more . . .

slide-10
SLIDE 10

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-11
SLIDE 11

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-12
SLIDE 12

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-13
SLIDE 13

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-14
SLIDE 14

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-15
SLIDE 15

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-16
SLIDE 16

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-17
SLIDE 17

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-18
SLIDE 18

Triangulation based Construction

  • Keep a triangulation of the area not yet swept over by the

wavefront [Aichholzer, Aurenhammer 1998].

  • Edge and Split events are witnessed by collapsing

triangles ⇒ Priority Queue.

slide-19
SLIDE 19

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-20
SLIDE 20

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-21
SLIDE 21

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-22
SLIDE 22

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-23
SLIDE 23

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-24
SLIDE 24

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-25
SLIDE 25

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-26
SLIDE 26

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-27
SLIDE 27

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-28
SLIDE 28

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-29
SLIDE 29

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-30
SLIDE 30

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-31
SLIDE 31

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-32
SLIDE 32

Flip events

  • Not all collapsing triangles result in a change of the

wavefront.

  • These cases need special handling nevertheless. They are

flip events.

slide-33
SLIDE 33

Our contribution

  • We have implemented this algorithm, filling in a few gaps in

the algorithm, including issues that arise from not assuming general position.

  • We have run extensive tests using this code, more on that

in a bit.

slide-34
SLIDE 34

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

slide-35
SLIDE 35

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

slide-36
SLIDE 36

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

slide-37
SLIDE 37

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

  • We need to update the triangulation at some point before

this happens, but how?

slide-38
SLIDE 38

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

  • We need to update the triangulation at some point before

this happens, but how?

slide-39
SLIDE 39

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

  • We need to update the triangulation at some point before

this happens, but how?

slide-40
SLIDE 40

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

  • We need to update the triangulation at some point before

this happens, but how?

slide-41
SLIDE 41

Triangulating the input

  • Triangulate the convex hull.
  • Unfortuantely the convex hull changes with time, and it

matters.

  • We need to update the triangulation at some point before

this happens, but how?

slide-42
SLIDE 42

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

slide-43
SLIDE 43

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

slide-44
SLIDE 44

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

slide-45
SLIDE 45

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

slide-46
SLIDE 46

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

slide-47
SLIDE 47

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

  • But what if these edges are parallel?
slide-48
SLIDE 48

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

  • But what if these edges are parallel?
slide-49
SLIDE 49

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

  • But what if these edges are parallel?
slide-50
SLIDE 50

Infinitely fast moving vertices

  • During an edge event, two wavefront vertices collide and a

new moving vertex gets launched.

  • Its direction and speed is dictated by the incident

wavefronts.

  • But what if these edges are parallel?
  • ⇒ infinitely fast moving vertex.
slide-51
SLIDE 51

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-52
SLIDE 52

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-53
SLIDE 53

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-54
SLIDE 54

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-55
SLIDE 55

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-56
SLIDE 56

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-57
SLIDE 57

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-58
SLIDE 58

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

slide-59
SLIDE 59

Flip event loops

  • Without general position, this algorithm can end up in

infinite loops.

  • This is not a result of inexact floating point operatons but

can also happen with exact arithmetic.

slide-60
SLIDE 60

Detecting flip event loops

  • Keep a history of flip events e1, e2, . . ., where each

ei = (ti, ∆i).

  • This history can be cleared when we encounter an edge or

split event.

  • If we encounter a flip event a second time, we may be in a

flip event loop.

slide-61
SLIDE 61

Handling flip event loops

Brief outline:

  • ea [eb] is the first [last] occurance of the duplicate event.
  • Events between ea and eb happen at the same time.
  • The set of triangles with events between ea and eb make

up one or more edge-connected components.

  • The component that contains the triangle of ea is a polygon

P which has collapsed to a straight line.

  • Undo the events of the triangles in P, and retriangulate P

and its neighborhood.

v1 vk v3 v2 v4 v5 e ve C(e) ∆e

  • This approach also is applicable to kinetic triangulations in
  • ther algorithms.
slide-62
SLIDE 62

Number of flip events

  • Three points moving at constant speed become collinear

at most twice.

  • With n vertices, there are

n

3

  • ∈ O(n3) combinatorially

different triangles.

  • O(n3) is the best known upper bound on the number of flip

events!

  • No input is known that results in more than quadratically

many flip events.

  • It turns out that for practical data the number of flip events

is very linear.

slide-63
SLIDE 63

Performance observations

theoretical worst case practical runtime space runtime space E&E1 O(n17/11+ǫ) O(n17/11+ǫ) N/A CGAL2 O(n2 log n) O(n2) O(n2 log n) O(n2) Bone3 O(n2 log n) O(n) O(n log n) O(n) Surfer4 O(n3 log n) O(n) O(n log n) O(n)

1Eppstein and Erickson, 1999

  • 2F. Cacciola, 2004

3Huber and Held, 2010 4this, based on Aichholzer and Aurenhammer, 1998

slide-64
SLIDE 64

Runtime tests

0.01 0.1 1 10 100 1000 10

3

10

4

10

5

10

6

runtime (se conds) Surfe r Bone CGAL 10MB 100MB 1GB 10

3

10

4

10

5

10

6

me mory usage Surfe r Bone CGAL

Runtime and memory usage behavior of CGAL, Bone, and Surfer for inputs of different sizes. Bone and Surfer use their IEEE 754 double precision backend.

slide-65
SLIDE 65

Summary

  • We have implemented Aichholzer and Aurenhammer’s

algorithm from 1998, filling in details in the algorithm

  • description. We fixed real problems that arise in the

absence of general position.

  • Our approach to handling flip events has wider

applications.

  • The implementation runs in O(n log n) time for real-world
  • data. The number of flip events is linear in practice.
  • It is industrial-strength, having been tested on tens of

thousands of inputs.

  • It is the fastest straight skeleton construction code to date,

handling millions of vertices in mere seconds.

slide-66
SLIDE 66

Questions

Thank you for your attention. Questions