theory practice vs · 2016-07-01 · locate by walk talk outline basic incremental algorithm locate...

209
1 Delaunay triangulation, Theory vs practice Olivier Devillers

Upload: others

Post on 31-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

1

Delaunay triangulation,

Theory vs practice

Olivier Devillers

Page 2: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

1

http://www.inria.fr/sophia/members/Olivier.Devillers/EuroCG2012/

Delaunay triangulation,

Theory vs practice

Bibliographical notes

[References, given in the abstract]

Benchmarks (src code)

Page 3: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

2

Everybody in this room know what Delaunay is!

Page 4: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

2

Page 5: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

2

empty circle property

Page 6: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

3

Page 7: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

3

empty sphere property

Page 8: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Page 9: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Page 10: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms

Incremental

Gift wrapping

2D/3D

2D

[1970. . . ]

Page 11: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms

Incremental

Gift wrapping

2D/3D

2D

Non optimal

”simple”

actually coded

linked to applications: meshes, reconstruction

[1970. . . ]

Page 12: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Worst case algorithms [1980. . . ]

Page 13: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Worst case algorithms [1980. . . ]

Divide & conquer

Plane sweep

2D

2D

Page 14: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms

Non optimal

”simple”

actually coded

linked to applications: meshes, reconstruction

[1970. . . ]

Worst case algorithms [1980. . . ]

Divide & conquer

Plane sweep

2D

2D

Page 15: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Worst case algorithms [1980. . . ]

Randomized algorithms [1990. . . ]

Page 16: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Worst case algorithms [1980. . . ]

Randomized algorithms

Delaunay tree

Clarkson & Shor

Dynamic updates (history graph)

Delaunay hierarchy

Spatial sorting (BRIO)

[1990. . . ]

Page 17: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Worst case algorithms [1980. . . ]

Randomized algorithms

[1995. . . ]Robustness issues

[1990. . . ]

Page 18: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

4

A (partial) history of Delaunay algorithms(and of computational geometry)

Earlier algorithms [1970. . . ]

Worst case algorithms [1980. . . ]

Randomized algorithms

[1995. . . ]Robustness issues

[1990. . . ]

Properties checking

Exact computation paradigm

VRONI

TRIANGLE

Page 19: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

5

Talk outline

Page 20: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

5

Locate by walk

Talk outline

Basic incremental algorithm

Locate using randomized data structures

Vertex removal in 2D

Remarks on CGAL programming

Conclusion

One word on robustness issues

Page 21: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

5

Locate by walk

Basic incremental algorithm

Locate using randomized data structures

Vertex removal in 2D

Remarks on CGAL programming

Conclusion

One word on robustness issues

Page 22: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Page 23: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

The exact computation paradigm

Page 24: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Page 25: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Page 26: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Page 27: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Run exact computation

Page 28: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Run exact computation

Extra cost

Page 29: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Extra cost

Delaunay 2D 10M points

Cartesian<double>

Exact predicates inexact constructions kernel

10.6 seconds

9.7 seconds

Page 30: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Extra cost

Delaunay 2D 10M points

Cartesian<double>

Exact predicates inexact constructions kernel

3D

10.6 seconds

9.7 seconds

82 seconds

75 seconds

Page 31: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Extra cost

Delaunay 2D 10M points

Cartesian<double>

Exact predicates inexact constructions kernel

3D

10.6 seconds

9.7 seconds

82 seconds

75 secondsmay loop (or crash)

Page 32: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

6

One word on robustness issues

Compute predicates approximately

Certify result

Extra cost

Delaunay 2D 10M points

Cartesian<double>

Exact predicates inexact constructions kernel

3D

10.6 seconds

9.7 seconds

82 seconds

75 seconds

All benchmarks

2.3 GHz, 16 GByte workstation

Exact predicates inexact constructions kernel

3.9 (Release mode)

Page 33: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

7

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Remarks on CGAL programming

Conclusion

One word on robustness issues

Basic incremental algorithm

Page 34: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

8

Basic incremental algorithm

Page 35: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

8

Basic incremental algorithm

Locate

Page 36: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

8

Basic incremental algorithm

Find conflicts

Page 37: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

8

Basic incremental algorithm

Remove triangles

Page 38: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

8

Basic incremental algorithm

Fill the hole

Page 39: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

9

Locate using randomized data structures

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Straight walk

Page 40: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Page 41: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Page 42: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Page 43: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Page 44: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Page 45: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Page 46: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Exit edge ?One orientation predicate

Page 47: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

Exit edge ?One orientation predicate

Page 48: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

End of walk ?A second orientation predicate

Page 49: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

10

Locate by walk - straight walk

End of walk ?A second orientation predicate

Page 50: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

11

Locate using randomized data structures

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Straight walkVisibility walk

Page 51: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Page 52: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Page 53: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Page 54: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Page 55: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Page 56: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Page 57: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Triangle with two exitsOne orientation predicate

Page 58: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

Triangle with one exit1.5 orientation predicate

One predicate

Two predicates

if this neighbor tried first

if this neighbor tried first

Page 59: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

12

Locate by walk - visibility walk

1.25 orientation predicate ?

Page 60: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

13

Visibility vs straight walk

Locate by walk

Page 61: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

13

Visibility vs straight walk

less predicates per crossed edge

similar number of crossed edges

2D and 3D

Locate by walk

experimental / theoretical

Page 62: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

13

Visibility vs straight walk

Speed improvement ?

Locate by walk

Page 63: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

13

Visibility vs straight walk

Speed improvement ?

Walk in Delaunay 1 Mpoints

Straight: 324 µs

Visibility: 285 µs

3D: 97 µs

Locate by walk

Page 64: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

13

Visibility vs straight walk

Speed improvement ?

Much easier to code

Walk in Delaunay 1 Mpoints

Straight: 324 µs

Visibility: 285 µs

3D: 97 µs

Locate by walk

Page 65: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

14

Locate using randomized data structures

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Straight walkVisibility walkStructural filtering

Page 66: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Page 67: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Page 68: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Walk may loop (not in Delaunay)

Page 69: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Walk may loop (not in Delaunay)

Robustness issue:

Non certified arithmetic

Rounding errors

Wrong decisionsduring walk

Page 70: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Walk may loop (not in Delaunay)

Robustness issue:

even in Delaunay

may loop

Page 71: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Walk may loop (not in Delaunay)

Robustness issue:

even in Delaunay

But only in very

special configurations

may loop

Page 72: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Orientation predicates

Certify all along the walk

Certify after a while, just in case

285 µseconds

220 µseconds

Page 73: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

15

Locate by visibility walk - structural filtering

Orientation predicates

Certify all along the walk

Certify after a while, just in case

285 µseconds

220 µseconds

97 µseconds

81 µseconds

2D 3D

Walk in Delaunay 1 Mpoints

Page 74: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

16

Locate using randomized data structures

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Straight walkVisibility walkStructural filteringWalk shape

Page 75: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

17

Locate by visibility walk - walk shape

Page 76: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

17

Locate by visibility walk - walk shape

Rightmost

Page 77: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

17

Locate by visibility walk - walk shape

Leftmost

Page 78: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

17

Locate by visibility walk - walk shape

In between

Page 79: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

17

Locate by visibility walk - walk shape

Page 80: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

18

Locate by visibility walk - walk shape

Turn counterclockwise from previous

Rightmost

1

2

Page 81: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

18

Locate by visibility walk - walk shape

Leftmost

Turn clockwise from previous

1

2

Page 82: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

18

Locate by visibility walk - walk shape

first with proba 13

first with proba 23

Balance left and right turns

Page 83: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

18

Locate by visibility walk - walk shape

220 µseconds

Walk in Delaunay 1 Mpoints

Leftmost

188 µsecondsBalanced

Page 84: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

19

Locate by visibility walk

220 µsecondsStructural filtering

188 µsecondsBalanced walk

Straight walk

Visibility walk

324 µseconds

285 µseconds

Walk in Delaunay 1 Mpoints

Page 85: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

20

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Delaunay tree

Page 86: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 87: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 88: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 89: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 90: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 91: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 92: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 93: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 94: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 95: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 96: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 97: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

Page 98: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

locate based on incircle predicate

] triangles in the Delaunay tree

Page 99: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

How many triangles created by the last point ?

Page 100: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

How many triangles created by the last point ?

Page 101: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

How many triangles created by the last point ?

Page 102: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

21

Data structures to locate - the Delaunay tree

locate based on incircle predicate

] triangles in the Delaunay tree

= 6n (randomized)

Page 103: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

22

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Delaunay tree

Delaunay hierarchy

Page 104: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 105: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 106: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 107: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 108: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Nearest Neighbor

Query

Page 109: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Nearest Neighbor

Query

Page 110: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 111: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 112: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

Page 113: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

The Delaunay tree

locate based on incircle predicate

] triangles in the Delaunay tree

= 6n (randomized)

Page 114: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

The Delaunay tree

locate based on incircle predicate

] triangles in the Delaunay tree

= 6n (randomized)

based on orientation predicate

] triangles in the hierarchy

= 1.03× 2n (expected)

can be chosen

The Delaunay hierarchy

Page 115: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

The Delaunay tree

locate based on incircle predicate

] triangles in the Delaunay tree

= 6n (randomized)

based on orientation predicate

] triangles in the hierarchy

= 1.03× 2n (expected)

can be chosen

O(n log n)

The Delaunay hierarchy

Page 116: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

23

Data structures to locate - the Delaunay hierarchy

The Delaunay tree

locate based on incircle predicate

] triangles in the Delaunay tree

= 6n (randomized)

based on orientation predicate

] triangles in the hierarchy

= 1.03× 2n (expected)

can be chosen

17 seconds2.3 seconds

50000 random points (original benchmarks in 2000).

The Delaunay hierarchy

Page 117: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

24

Vertex removal in 2DRemarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Delaunay tree

Biased randomized insertion order

Delaunay hierarchy

Page 118: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Page 119: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Locate is easy if you know a vertex nearby

Page 120: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Locate is easy if you know a vertex nearby

Natural idea: sort the points, locate from previous

Page 121: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

x-order

Page 122: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Hilbert order

Page 123: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Biased order (Spatial sorting)

Page 124: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Biased order (Spatial sorting)

Page 125: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

Biased order (Spatial sorting)

Page 126: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

random order

x-order

Hilbert order

Biased order (Spatial sorting)

locate using Delaunay hierarchy

0.7 seconds

157 seconds

3 seconds

0.8 seconds

6 seconds

Delaunay 2D 1M random points

Page 127: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

25

Data structures to locate - biased random insertion order

random order

x-order

Hilbert order

Biased order (Spatial sorting)

locate using Delaunay hierarchy

Delaunay 2D 100K parabola points

128 seconds

632 seconds

46 seconds

0.3 seconds

0.3 seconds

Page 128: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

26

10.6 secondsBiased random order

Delaunay tree

Delaunay hierarchy

∼ 10 mn (estimate)

90 seconds

Construction of Delaunay 10 M random points

Data structures to locate

Page 129: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

27

Remarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Page 130: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

28

Vertex removal

Page 131: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

28

Vertex removal

Page 132: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

28

Vertex removal

Page 133: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

28

Vertex removal

Page 134: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

29

Remarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Various algorithmsBoundary expansion

Page 135: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

30

release 3.5, 2D implementation

Vertex removal - boundary expansion

Page 136: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

30

release 3.5, 2D implementation

hole boundary = queue

Vertex removal - boundary expansion

Page 137: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

30

release 3.5, 2D implementation

find new incident triangle in linear time

Vertex removal - boundary expansion

Page 138: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

30

release 3.5, 2D implementation

Vertex removal - boundary expansion

Page 139: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

30

release 3.5, 2D implementation

Vertex removal - boundary expansion

Page 140: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

31

Remarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Various algorithmsBoundary expansionTriangulate and sew

Page 141: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

32

current 3D implementation

Vertex removal - triangulate and sew

Page 142: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

32

current 3D implementation

Delaunay of neighbors

Vertex removal - triangulate and sew

Page 143: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

32

current 3D implementation

delete extra triangles and sew

Vertex removal - triangulate and sew

Page 144: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

32

current 3D implementation

delete extra triangles and sew

not implemented in 2D

Vertex removal - triangulate and sew

Page 145: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

33

Remarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Various algorithmsBoundary expansionTriangulate and sewFlip the hole

Page 146: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 147: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34triangulate from any vertex

Vertex removal - flip the hole

Page 148: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34queue of edges to be checked

Vertex removal - flip the hole

Page 149: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 150: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 151: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 152: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 153: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 154: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

Vertex removal - flip the hole

Page 155: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

34

a litle bit faster

Vertex removal - flip the hole

Page 156: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

35

Remarks on CGAL programmingConclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Various algorithms

Low degree optimization

Page 157: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

36

degree 3

Vertex removal - low degree optimization

Page 158: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

36

degree 3

almost nothing to do

Vertex removal - low degree optimization

Page 159: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

37

degree 4

Vertex removal - low degree optimization

Page 160: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

37

degree 4

just one incircle test to decide

Vertex removal - low degree optimization

Page 161: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

Vertex removal - low degree optimization

Page 162: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

”star” the pentagon from the right vertex

Vertex removal - low degree optimization

Page 163: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

”star” the pentagon from the right vertex

Vertex removal - low degree optimization

Page 164: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

”star” the pentagon from the right vertex

Vertex removal - low degree optimization

Page 165: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

”star” the pentagon from the right vertex

Vertex removal - low degree optimization

Page 166: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

”star” the pentagon from the right vertex

Vertex removal - low degree optimization

Page 167: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

38

degree 5

”star” the pentagon from the right vertex

Vertex removal - low degree optimization

Page 168: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

39

degree 5

Decision tree

Vertex removal - low degree optimization

Page 169: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

39

degree 5

Decision tree3∈012

4∈0234∈013

yesno

4∈1234∈012

v0v2 v1

v3

v4v4

v0

v2v1

v3v4

Vertex removal - low degree optimization

Page 170: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

Vertex removal - low degree optimization

Page 171: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

Vertex removal - low degree optimization

Page 172: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

Vertex removal - low degree optimization

Page 173: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

Vertex removal - low degree optimization

Page 174: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

Vertex removal - low degree optimization

Page 175: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

Vertex removal - low degree optimization

Page 176: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

40

degree 6

14 results

Vertex removal - low degree optimization

Page 177: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

41

degree 6Decision tree

Vertex removal - low degree optimization

Page 178: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

41

degree 6Decision tree

1∈230

4∈235

1∈2341∈235

4∈0135∈1241∈345star5

4∈0135∈013 5∈014antiN0N2

antiN0

5∈014

5∈014 star1N1star4 antiN1

star1N1

diamond1

4∈503

star3 antiN0

4∈235

4∈2305∈230

4∈012star05∈0124∈503

4∈1254∈502antiN2N0 star5star0

5∈012

diamond0

N2 4∈015

star2 star4N2 antiN1

v0

v1

v2v3

v5

v4

Vertex removal - low degree optimization

Page 179: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

41

degree 6Decision tree

1∈230

4∈235

1∈2341∈235

4∈0135∈1241∈345star5

4∈0135∈013 5∈014antiN0N2

antiN0

5∈014

5∈014 star1N1star4 antiN1

star1N1

diamond1

4∈503

star3 antiN0

4∈235

4∈2305∈230

4∈012star05∈0124∈503

4∈1254∈502antiN2N0 star5star0

5∈012

diamond0

N2 4∈015

star2 star4N2 antiN1

v0

v1

v2v3

v5

v4

6 incircle predicates

Vertex removal - low degree optimization

Page 180: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

42

symmetric tree

degree 7Decision tree

Vertex removal - low degree optimization

Page 181: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

42

symmetric tree

degree 7Decision tree

10 incircle predicates

Vertex removal - low degree optimization

Page 182: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

43

degree 3 4 5 6 7 8? 9] results 1 2 5 14 42 132 429] leaves 1 2 6 24 130 '500dlog2 ]resultse 0 1 3 4 6 8 9tree height 0 1 3 6 10 '14] lines of code 30 40 90 280 700 '2500? not implemented. The sizes of the tree and the code are estimated

Vertex removal - low degree optimization

Page 183: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

44

Remarks on implementation

limited memory allocation, use old faces ”in place”

re-use as many neighbor links as possible

Vertex removal - low degree optimization

Page 184: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

44

Remarks on implementation

limited memory allocation, use old faces ”in place”

re-use as many neighbor links as possible

tree implementationif incircle(...)

if incircle(...)

if incircle(...) use_this_shape(face0,face1,face2...)

else use_other_shape(face2,face3,face4...)

......

Vertex removal - low degree optimization

Page 185: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

45

degree

small degrees

deletion time per vertex

3 4 5 6 7 8 9 10 11 ≥ 12

10µs

Vertex removal

Boundary expansionFlip the hole

Page 186: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

45

degree

3.5

small degrees

deletion time per vertex

3 4 5 6 7 8 9 10 11 ≥ 12

10µs

Vertex removal

Boundary expansionFlip the hole

3.6

Page 187: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

45

degreeinit (load memory)

3.5

small degrees

deletion time per vertex

3 4 5 6 7 8 9 10 11 ≥ 12

10µs

Vertex removal

Boundary expansionFlip the hole

3.6

Page 188: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

45

degree

] points

30%

init (load memory)

3.5

small degrees

deletion time per vertex

degree distribution

3 4 5 6 7 8 9 10 11 ≥ 12

10µs

Vertex removal

Boundary expansionFlip the hole

3.6

Page 189: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

46

Conclusion

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Remarks on CGAL programming

Page 190: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

47

Algorithmic choices

Page 191: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

47

Algorithmic choices

Theoretical efficiency

Page 192: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

47

Algorithmic choices

Theoretical efficiency

Practical efficiency

Page 193: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

47

Algorithmic choices

Theoretical efficiency

Practical efficiency

Robustness issues

Page 194: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

47

Algorithmic choices

Theoretical efficiency

Practical efficiency

Robustness issues

Modularitytraits classes

data structuresgeometry

Page 195: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

47

Algorithmic choices

Theoretical efficiency

Practical efficiency

Robustness issues

Modularitytraits classes

data structuresgeometry

Minimal requirements

e.g. do not use strange predicates

Page 196: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

48

Delaunay triangulation

Geometric traits Triangulation data structure

Page 197: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

48

Delaunay triangulation

Geometric traits Triangulation data structureIR2

Page 198: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

48

Delaunay triangulation

Geometric traits Triangulation data structure

IR3 projection

Page 199: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

48

Delaunay triangulation

Geometric traits Triangulation data structure

IR2 other metric

Page 200: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

48

Delaunay triangulation

Geometric traits Triangulation data structure

Periodic triangulation

Page 201: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

49

' 1µs per point

Page 202: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

50

' 8µs per point

Page 203: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

51

One word on robustness issuesBasic incremental algorithm

Locate by walk

Locate using randomized data structures

Vertex removal in 2D

Remarks on CGAL programming

Conclusion

Delaunay challenges

Page 204: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

52

Delaunay challenges

Practical vs worst case size of Delaunay 3D

Page 205: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

52

Known results

Delaunay challenges

Practical vs worst case size of Delaunay 3D

Θ(n2) worst case

Θ(n) random in ball

Ω(n)O(n log n) random on polyhedron

O(n log n) good sample of smooth generic surface

Θ(n log n) random on cylinder

Page 206: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

52

Known results

Delaunay challenges

Practical vs worst case size of Delaunay 3D

Θ(n2) worst case

Θ(n) random in ball

Ω(n)O(n log n) random on polyhedron

O(n log n) good sample of smooth generic surface

Θ(n log n) random on cylinder

Find good models of practical data

(Smooth analysis)

Page 207: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

52

Delaunay challenges

Practical vs worst case size of Delaunay 3D

Better algorithm for 3D deletion

10 µs to insert

100 µs to delete

Page 208: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

52

Delaunay challenges

Practical vs worst case size of Delaunay 3D

Better algorithm for 3D deletion

One billion points

Needs memory efficient algorithms

Cache effects are already important

Page 209: Theory practice vs · 2016-07-01 · Locate by walk Talk outline Basic incremental algorithm Locate using randomized data structures Vertex removal in 2D Remarks on CGAL programming

53

Questions