Dynamic Delaunay Triangulation - PowerPoint PPT Presentation

About This Presentation
Title:

Dynamic Delaunay Triangulation

Description:

can compute in ?(n lg n) dual of Voronoi diagram. minimum angle is maximized ... O(lg n) ... Depth must be O(lg n) expected. So point location queries are fast. ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 28
Provided by: pete65
Learn more at: http://www.cs.cmu.edu
Category:

less

Transcript and Presenter's Notes

Title: Dynamic Delaunay Triangulation


1
Dynamic Delaunay Triangulation
  • Theory Lunch / Mar 12, 2003
  • Benoît Hudson

2
A Delaunay Mesh
  • We have points in the plane
  • We want a mesh of triangles
  • Delaunay triangulation
  • defining feature triangles' circumscribing
    circle is empty
  • Generalizes to any Rd

3
So what?
  • This means
  • the triangulation is well-defined (unique for a
    set of points)
  • can compute in ?(n lg n)
  • dual of Voronoi diagram
  • minimum angle is maximized
  • visualization, numerical stability

4
Dynamic Delaunay
  • We can compute the Delaunay in O(n lg n)
  • New point comes in.
  • most of the diagram is unchanged
  • want to pay o(n lg n) ideally, O(lg n)
  • Old point is removed.
  • again, little changes
  • Queries check which triangle a point is in.
  • or, draw the triangulation

5
2-d is hard let's go shopping!
  • 1-d Delaunay
  • segments instead of triangles
  • circumcircle of a segment is just the segment
  • A good structure for this
  • fast insert / delete
  • fast query
  • for now random insertion / deletion order.

6
Binary Search Trees!
  • Random inserts just use vanilla insert.

a
a
empty
insert a
insert b
b
a
a
b
-inf
inf
-inf
inf
-inf
inf
7
Deletions
  • Deleting p
  • Want structure as if p were never inserted
  • ease of analysis now the structure is unique
  • Answer
  • keep track of insertion time.
  • rotate p to a leaf, then remove it.
  • just like deleting from a treap

8
Delete b
a
a
a
a
b
c
c
c
b
d
d
c
e
d
e
b
e
d
e
b
a
c
d
e
9
Another view
  • Leaves are the current intervals
  • Nodes have intervalsof when a new nodewas
    inserted
  • Search for p look at left, right interval

-inf,inf
-inf,a
a,inf
-inf,b
b,a
c,b
-inf,c
e,a
b,e
c,d
d,b
10
Sameness
  • It's the same tree
  • nodes are the vertices
  • label edges by tightest interval so far
  • nodes are the intervals
  • label nodes by childrens' midpoints

Easy to update labels through rotate.
11
Back to 2-d
  • Intervals are now triangles.
  • Insertion

p
12
2-d Data Structure
  • What's a node?
  • Either Node vertex p
  • Or Node triangle T

13
Previous work
  • Lots of previous work ca. 91-93
  • Guibas et al, Melhorn et al, Devillers et al
  • All of it has triangles as nodes
  • Devillers et al
  • insertion is nice easy
  • deletion is hell to explain
  • 1-d analogue cutting out the node,
  • patching everything up nicely
  • requires 2 or 3 auxiliary structures

14
Vertices as nodes
  • Better analogy to search trees.
  • Starting case an infinite-size triangle
  • (1-d was infinite-size segment)
  • We have a DAG
  • nodes vertices
  • edges triangles (1-d was intervals)

15
Insertion
  • Inserting a point
  • find where it goes
  • 1-d find the segment whose circumcircle
    (segment) it's in
  • 2-d find the triangles whose circumcircles it's
    in
  • create new node, edges
  • 1-d bury the old segment with 2 new ones
  • 2-d bury the (many) old triangles with (many)
    new ones

16
Insertion pseudo-code
  • Find encroached triangles that are leaves
  • those whose circumcircle p lies inside
  • Make all of them have p be their burier
  • For each triangle,
  • for each edge (i,j)
  • if another triangle has edge (i,j) skip (both are
    being buried)
  • else, create new triangle (p,i,j) with p its
    creator

17
Rotation in 2-d?
  • We are rotating x to be below y
  • Always rotate oldest child up
  • Goal new structure is as if x was inserted after
    y, not before.
  • Afterwards, need to
  • update who x's parents are now pointing to
  • move some triangles from x to y
  • destroy some triangles
  • create some triangles

18
Rotation pseudo-code
  • Rules
  • y keeps triangles it created, unless x is a
    vertex
  • y creates new triangles that x blocked
  • y takes parents of x that y encroaches
  • x keeps triangles it created, unless y encroaches
  • x destroys old triangles that y now blocks
  • x takes triangles y created, if x is a vertex

19
Rotation in 1-d
xa yb
  • Rotate a down.

-inf,inf
a
  1. b keeps b,inf
  2. b creates -inf,b
  3. b takes -inf,inf
  4. a keeps -inf,a
  5. a destroys a,inf
  6. a takes a,b

a,inf
-inf,a
b
b,inf
a,b
a
b
-inf
inf
20
  1. b keeps b,inf
  2. b creates -inf,b
  3. b takes -inf,inf
  4. a keeps -inf,a
  5. a destroys a,inf
  6. a takes a,b

-inf,inf
-inf,inf
a
b
a,inf
-inf,a
b,inf
a
b
a,b
-inf,a
b,inf
a,b
a
b
a
b
-inf
inf
-inf
inf
21
Does this work?
  • To prove
  • Rotation produces the structure that would have
    been produced had x been inserted after y
  • Triangles not affected by the rotation should not
    be affected.
  • Triangles affected by the rotation are correctly
    moved / created / destroyed.

22
A proof (1)
  • Triangles not affected by the rotation should
    have creator burier not depend on insertion
    order of x,y
  • T created after y
  • then must not be encroached by x or y
  • T buried before x
  • someone else encroaches and is still before y

23
A proof (2)
  • Affected triangles are correctly updated.
  • Each rule is correct.
  • By proof (1), anything not included in those
    rules isn't affected.
  • QED.

24
How big?
  • Clearly, DAG has n nodes (vertices).
  • How many edges (triangles) ?
  • Forward analysis how many will we create?
  • dunno.
  • Backward analysis do it, and see what the output
    looks like.

25
Backwards
  • Look at last ith vertex inserted. How many
    triangles did it create?
  • Total triangles in N-node triangulation is at
    most 3N-3
  • i real vertices 3 infinite ones 3i3 total
  • random vertex has (3i3)/i 33/i triangles.
  • Sum 1..n 3nHn O(n).

26
Small, but fast?
  • Insertions take time proportional to triangles
    encroached on by p.
  • Can show that expected triangles is O(lg n).
  • big picture count how many triangles there can
    be that have j vertices encroach on them.
  • find probability a triangle has p encroach on it
  • sum over all triangles Clarkson, Shur

27
Corollary
  • Depth must be O(lg n) expected.
  • So point location queries are fast.
  • Also, deletion is fast O(lg n) rotations
  • Rotations involve triangles created by or buried
    by x,y. Constant number of these.
Write a Comment
User Comments (0)
About PowerShow.com