Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van...

31
Generating Realistic Terrains with Higher- Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and Virtual Environments Utrecht University

Transcript of Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van...

Page 1: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Generating Realistic Terrains with Higher-Order Delaunay

Triangulations

Thierry de Kok

Marc van Kreveld

Maarten Löffler

Center for Geometry, Imagingand Virtual Environments

Utrecht University

Page 2: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Overview

• Introduction– Triangulation for terrains– Realistic terrains– Higher order Delaunay triangulations

• Minimizing local minima– NP-hardness– Two heuristics: algorithms and experiments

• Other realistic aspects

Page 3: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Polyhedral terrains, or TINs

• Points with (x,y) and elevation as input

• TIN as terrain representation

• Choice of triangulation is important

1012

1573

78

2421

2529

19

1012

1573

78

2421

2529

19

Page 4: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Realistic terrains

• Due to erosion, realistic terrains– have few local minima– have valley lines that continue

local minimum, interrupted valley line

after an edge flip

Page 5: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Terrain modeling in GIS

• Terrain modeling is extensively studied in geomorphology and GIS

• Need to avoid artifacts like local minima

• Need correct “shape” for run-off models, hydrological models, avalanche models, ...

6 12

1752

2124

local minimum in a TIN

Page 6: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Delaunay triangulation

• Maximizes minimum angle

• Empty circle property

Page 7: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Delaunay triangulation

• Does not take elevation into account

• May give local minima

• May give interrupted valleys

Page 8: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Triangulate to minimize local minima?

Page 9: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Triangulate to minimize local minima?

Connect everything to global minimum bad triangle shape & interpolation

Page 10: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Higher order Delaunay triangulations

• Compromise between good shape & interpolation, and flexibility to satisfy other constraints

• k -th order: allow k points in circle

1st order

0th order

4th order

Page 11: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Higher order Delaunay triangulations

• Introduced by Gudmundsson, Hammar and van Kreveld (ESA 2000)

• Minimize local minima for 1st order:O(n log n) time

• Minimize local minima for kth order:O(k2)-approximation algorithm inO(nk3 + nk log n) time (hull heuristic)

Page 12: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

This paper, results

• NP-hardness of minimizing local minima

• NP-hardness for kth order, k = (n)

• New flip heuristic: O(nk2 + nk log n) time

• Faster hull heuristic: O(nk2 + nk log n) time

• Implementation and experiments on real terrains

• Heuristic to avoid interrupted valleys: valley heuristic

Page 13: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Flip Heuristic

• Start with Delaunay triangulation

• Flip edges that remove, or may “help” remove a local minimum

• Only flip if 2 circles have ≤ k points inside

• O(nk2 + nk log n) time

flip18

15

23

11

18

15

23

11

Page 14: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Hull Heuristic

• Start with Delaunay triangulation

• Compute all useful order k Delaunay edges that remove a local minimum

useful order 4 Delaunay edge

Page 15: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Hull Heuristic

• Add them incrementally, unless– it intersects a previously inserted edge

• Retriangulate the polygon that appears

Page 16: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Hull Heuristic

• Add them incrementally, unless– it intersects a previously inserted edge

• Retriangulate the polygon that appears

Page 17: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Experiments on terrains

Page 18: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Experiments

• Do higher order Delaunay triangulations help to reduce local minima?

• How does this depend on the order?

• Which heuristic is better: flip or hull?

• Do they create any artifacts?

• 5 terrains

• orders 0-10

• flip and hull heuristic

Page 19: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

• Quinn Peak• Elevation grid of

382 x 468

• Random sample of 1800 vertices

• Delaunay triangulation

• 53 local minima

Page 20: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

• Hull heuristic applied

• Order 4 Delaunay triangulation

• 25 local minima

Page 21: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

0

10

20

30

40

50

60

0 1 2 3 4 5 6 7 8 9 10

order

loca

l m

inim

aHull heuristic

Flip heuristic

Page 22: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Another realistic aspect

• Valleys continue

26

2120

15

3432

14 1721

19

2627

normal edge ridge edge valley edge

Valley edges can end in vertices that are not local minima

Page 23: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Valley Heuristic

• Remove isolated valley edges by flipping them out

• Extend valley edge components further down

• O(nk log n) time

Page 24: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Experiments

• Terrains with valley edges and local minima shown

• Delaunay, Flip-8, Hull-8, Valley-8,Hull-8 + Valley-8

Page 25: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Delaunay triangulation

Page 26: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Flip-8

Page 27: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Hull-8

Page 28: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Valley-8

Page 29: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Hull-8 + valley heuristic

Page 30: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Conclusions

• Hull and Flip reduce local minima by 60-70% for order 8; Hull is often better

• Valley reduces the number of valley edge components by 20-40% for order 8

• Flip gives artifacts

• Hull + Valley seems best

Page 31: Generating Realistic Terrains with Higher-Order Delaunay Triangulations Thierry de Kok Marc van Kreveld Maarten Löffler Center for Geometry, Imaging and.

Future Work

• NP-hardness for small k ?

• Other properties of terrains– Spatial angles– Local maxima– Other hydrological features (watersheds)

• Improvements valley heuristic