geometric data structures dr. m. gavrilova. lecture plan voronoi diagrams trees and grid variants
Post on 19-Dec-2015
218 views
TRANSCRIPT
![Page 1: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/1.jpg)
Geometric Data Structures
Dr. M. Gavrilova
![Page 2: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/2.jpg)
Lecture Plan Voronoi diagrams Trees and grid variants
![Page 3: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/3.jpg)
Part 1
Voronoi diagram Delaunay triangulation
![Page 4: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/4.jpg)
Voronoi diagrams VD: Thiessen polygons, Delaunay
triangulations, tessellations
![Page 5: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/5.jpg)
Tessellation Tessellation is often obtained using
Delaunay triangulation.
![Page 6: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/6.jpg)
Voronoi diagram Given a set of N sites (points) in the
plane or a 3D space Distance function d(x,P) between point x
and site P is defined according to some metric
Voronoi region Vor(P) is the set of all points which are closer to P than to any other site
Voronoi diagram is the union of all Voronoi regions
![Page 7: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/7.jpg)
Voronoi Diagram
![Page 8: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/8.jpg)
Voronoi diagram
Definition 1 For a finite set dES , a Voronoi diagram (VD) of S associates to eachSp a Voronoi region )(pVor such that
}}{),,(),(|{)( pqqxpxxp SddEVor d ,
where ,d denotes the Euclidean distance function [Okabe et. al. 92].
![Page 9: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/9.jpg)
Voronoi diagram
C o n s i d e r t h e b i s e c t o r ),(),(),( xqxpxqp ddB b e t w e e n t w o s i t e s Sqp , o f a
V o r o n o i d i a g r a m i n dE . T h e b i s e c t o r d i v i d e s t h e s p a c e i n t o t w o h a l f s p a c e s . D e n o t e t h e
h a l f s p a c e t h a t c o n t a i n s t h e p o i n t p a s ),(),(),( xqxpxqp ddH . B y d e f i n i t i o n t h i s
h a l f s p a c e a l s o c o n t a i n s t h e b i s e c t o r ),( qpB .
D e f i n i t i o n 2 F o r a f i n i t e s e t dES , a V o r o n o i d i a g r a m o f S i s t h e c o l l e c t i o n o f a l l V o r o n o i
r e g i o n s SVor pp ),( s u c h t h a t
pq
qpp
S
HVor ),()( [ O k a b e e t . a l . 9 2 ] .
![Page 10: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/10.jpg)
Voronoi diagram properties
Assumption 1. No four points from the set S are cocircular.Property 1. Voronoi vertex is the intersection of 3 Voronoi
edges and a common point of 3 Voronoi regionsProperty 2. Voronoi vertex is equidistant from 3 sites. It
lies in the center of a circle inscribed between 3 citesProperty 3. Empty circle property This inscribed circle is
empty, i.e. it does not contain any other sitesProperty 4. Nearest-neighbor property If Q is the nearest
neighbor of P then their Voronoi regions share an edge (to find a nearest neighbor it is sufficient to check only neighbors in the VD)
Property 5. Voronoi region Vor(P) is unbounded if and only if P belongs to the boundary of convex hull of S.
![Page 11: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/11.jpg)
VD propertiesProperty 1. A Voronoi vertex v is the intersection of 3 Voronoi edges and a common point of3 Voronoi regions.
1) assume 3)deg(v .
3,,...
...,,, 321
npvd
pvdpvdpvd
n
Contradicts the non-circumcircularity assumption.
2) assume 3)deg(v . Then both edges are parts of the bisector
21,ppB . Both edges lie on the same line. Then v is not avertex.
v
1p
np3p
2p
v
1p
2p
![Page 12: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/12.jpg)
VD properties
Property 2. Voronoi vertex is equidistant from 3 sites. It lies in the centerof a circle inscribed between 3 cites.
321 ,,, pvdpvdpvd
v
1p
3p
2p
![Page 13: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/13.jpg)
VD properties
Property 3 (empty circle property). The inscribed circle is empty, i.e. it does notcontain any other sites.
1) assume a site q lies inside the inscribed circle C .
Then 1,, pvdrqvd C . This contradicts the fact
that 1pVorv .
2) assume q lies on the boundary of the inscribed circle.
Then 321 ,,,, pvdpvdpvdqvd . This
contradicts non-circumcircularity assumption.
v
1p
3p
2p
q
![Page 14: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/14.jpg)
VD properties
Property 4 (Nearest-neighbor property). If q is the nearest neighbor of p then their
Voronoi regions share an edge (to find a nearest neighbor it is sufficient to check onlyneighbors in the VD)
Assume pVor and qVor don't have common
points. Segment pq crosses the boundary of pVorat a point x . Assume x belongs to the Voronoi edge
between pVor and sVor .
qxdpxdqpd ,,, ,
sxdpxdspd ,,, , sxdqxd ,, because qVorxsVorx ,
Then spdqpd ,, – contradicts the fact that q is the nearest neighbor of p .
p s
q
x
![Page 15: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/15.jpg)
VD properties
Property 5. Voronoi region pVor is unbounded if and only if p belongs to the boundary of
the convex hull SCH .
1) assume SCHp . Select a ray pVorr . r will
intersect the boundary of SCH . Assume r intersects a
segment 21ss . It is easy to show that if rx , x
then either pxdsxd ,, 1 or
pxdsxd ,, 2 .
Contradicts the fact that pVorx
2) if SCHp then it is possible to draw a line l through p such that
all sites of S lie on the same side of l . Select a ray lr originating atp . It is easy to show that any rx is closer to p than to any other site.
Then pVorr , i.e. pVor is unbounded.
p xr
s2
s1
p
x
r
l
![Page 16: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/16.jpg)
Delaunay triangulation
Definition 3. A Delaunay triangulation (DT) is the straight-line dual of the Voronoi diagram obtained by joining all pairs of sites whose Voronoi regions share a common Voronoi edge [Delaunay 34].
Follows from the definition: If two Voronoi regions Vor(P) and Vor(Q) share an edge, then
sites P and Q are connected by an edge in the Delaunay triangulation
If a Voronoi vertex belongs to Vor(P), Vor(Q) and Vor(R), then DT contains a triangle (P,Q,R)
![Page 17: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/17.jpg)
Delaunay triangulation
![Page 18: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/18.jpg)
DT propertiesAssumption 2. No three points from the set S lie
on the same straight line.
Theorem. The straight-line dual of the Voronoi diagram is a triangulation of S [Preparata and Shamos 85].
Property 5. The circumcircle of any Delaunay triangle does not contain any points of S in its interior [Lawson 77].
Property 6. If each triangle of a triangulation of the convex hull of S satisfies the empty circle property, then this triangulation is the Delaunay triangulation of [Lawson 77].
![Page 19: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/19.jpg)
VD and DT Property 7 For the Voronoi diagram of n points on the plane and its dual
Delaunay triangulation the following relationships are true when 3n :
nvDT ,
63 nee VDDT ,
52 nvf VDDT ,
where VDv and DTv represent the number of vertices in VD and DT,
correspondingly, VDe and DTe represent the number of edges in VD and DT
and DTf is the number of triangles in DT
![Page 20: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/20.jpg)
DT propertiesThe edge of the quadrilateral satisfies the local min-max
criterion if the following equation holds:
A triangulation satisfies the global min-max criterion if every internal edge of a convex quadrilateral in the triangulation satisfies the local min-max criterion.
Property 8. The Delaunay triangulation satisfies the global min-max criterion [Lawson 77].
Property 9. If a triangulation of the convex hull of satisfies the global min-max criterion then it is the Delaunay triangulation of [Lawson 77].
)(min)(min ii
ii
b
c
d
a
b
c
d
a
![Page 21: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/21.jpg)
VD and DT
Both DT and VD effectively represent the proximity information for the set of sites. They can be easily transformed into each other.
VD contains geometrical information, while DT contains topological information.
![Page 22: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/22.jpg)
Generalized Voronoi diagram
Given a set S of n sites (spheres) in d-dimensional space
Distance function d(x,P) between a point x and a site P is defined.
![Page 23: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/23.jpg)
Generalized Voronoi diagramA generalized Voronoi diagram (GVD)
for a set of objects in space isthe set of generalized Voronoi regions
where d(x,P) is a distance function between a point x and a site P in the
d-dimensional space.
}{\,,, PSQQdPdPVor xxx
![Page 24: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/24.jpg)
Generalized Delaunay tessellation
A generalized Delaunay triangulation (GDT) is the dual of the generalized Voronoi diagram obtained by joining all pairs of sites whose Voronoi regions share a common Voronoi edge.
![Page 25: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/25.jpg)
General metricsGeneralized distance functions
Power
Additively weighted
Euclidean
Manhattan
supremum
22),(),( pp rdPd pxx
pe rdPd ),(),( pxx
p
d
iii rpxPd
1),(x
p
d
iii rpxPd
1
2)(),(x
piidi
rpxPd ..1max),(x
x
P
d(x,P)
P
x Pd ,x
P
x
pr
Pxd ,
P
x
pr
Pxd ,
![Page 26: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/26.jpg)
Power and Euclidean Voronoi diagrams
P Q
B(P,Q)
Euclidean bisectorPower bisector
Power diagram and Delaunay triangulation
P Q
B(P,Q)
Euclidean diagram and Delaunay triangulation
![Page 27: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/27.jpg)
Manhattan and Supremum VD
Supremum bisectorsManhattan bisectors
Manhattan diagram and Delaunay triangulation Supremum diagram and Delaunay triangulation
![Page 28: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/28.jpg)
Properties of Generalized VD and DT The vertex of generalized Voronoi diagram is a center of a
sphere inscribed between d +1 Voronoi sites (spheres). The inscribed sphere is empty, i.e. it does not contain any
other sites. One of the facets of the generalized Voronoi region Vor(P)
defines a nearest-neighbor of P. A Voronoi region Vor(P) is unlimited if and only if site P
belongs to the convex hull of S. The sphere inscribed between the sites comprising a simplex
of generalized Delaunay tessellation is an empty sphere. The power Delaunay tessellation of a set of spheres S is a
tetrahedrization.
![Page 29: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/29.jpg)
Algorithmic Strategies Incremental Divide-and-conquer Sweep-line/plane Dimension reduction Geometric decomposition
![Page 30: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/30.jpg)
Algorithmic Strategies
Algorithm development techniques on example of Voronoi Diagrams
Incremental construction Divide and conquer Sweep-plane Geometric transformations Dynamic data structures
![Page 31: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/31.jpg)
Incremental construction
INCIRCLE condition
power
Euclidean
Supremum
Polynomial of 4th order in the plane
Polynomial of 8th order in the plane
System of linear equations and inequalities in the plane
![Page 32: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/32.jpg)
Incremental construction
Incremental method outline Insert new site PPerform swap operations on quadrilaterals where the empty-sphere condition is not satisfied
Method complexity is O(n2) in the plane.
![Page 33: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/33.jpg)
Sweep-plane algorithm Algorithm description
Throw pebbles in the water Intersection of waves gives the Voronoi
diagram Add time as 3rd dimension: waves
transform to pyramids. Sweep pyramids with the sweep-plane to
get the Voronoi diagram
![Page 34: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/34.jpg)
Sweep-plane algorithm Properties
The complexity of the sweep-plane algorithm in generalized Manhattan metric is O(n log n).
Sweep-plane method is not applicable to the power diagram construction.
![Page 35: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/35.jpg)
Sweep-plane algorithm
An example of a sweep-plane construction of a Voronoi diagram in L1 metric
![Page 36: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/36.jpg)
Cones in L1
Sweep-plane algorithm
![Page 37: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/37.jpg)
Sweeping the cones
Sweep-plane algorithm
![Page 38: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/38.jpg)
Parabolas
sweep direction
Sweep-plane algorithm
![Page 39: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/39.jpg)
Site event
Sweep-plane algorithm
![Page 40: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/40.jpg)
Site event
Sweep-plane algorithm
![Page 41: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/41.jpg)
two half-bisectors are createdone is growing
Sweep-plane algorithm
![Page 42: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/42.jpg)
The half-bisector changes its direction
Sweep-plane algorithm
![Page 43: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/43.jpg)
Site event2 half-bisectors created
Sweep-plane algorithm
![Page 44: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/44.jpg)
The half-bisectorChanges its direction
Sweep-plane algorithm
![Page 45: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/45.jpg)
Circle eventTriangle added to DT
2 half-bisectors deleted1 half-bisector created
Sweep-plane algorithm
![Page 46: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/46.jpg)
Half-bisectorchanges its
direction
Sweep-plane algorithm
![Page 47: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/47.jpg)
No moreevents
Sweep-plane algorithm
![Page 48: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/48.jpg)
Resulting Voronoi diagram and Delaunay triangulation
Sweep-plane algorithm
![Page 49: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/49.jpg)
Sweep-plane algorithm
Waves in Manhattan metric Waves in
power metric
![Page 50: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/50.jpg)
Swap method: from VD to power diagram
Relationship between Voronoi bisector and power bisector: The power bisector is moved relative to the Voronoi bisector by
Bisector transformation
),(2
22
qpd
rr qp
![Page 51: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/51.jpg)
Swap method: from VD to power diagram Algorithm overview
Inflate VD sites Transform edges of VD Perform INCIRCLE test on quadrilaterals and
perform swap operations if needed.The worst-case complexity of algorithm is
O(n2).
![Page 52: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/52.jpg)
Swap method Voronoi to power
(a)
p
(b)
p
e e
e *
1
p
p
p
2
13
4
2
p
p
p3
4
e *
![Page 53: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/53.jpg)
Dynamic data structures – swap applicationDynamic data structures – swap applicationApproach
construct and maintain a dynamic Delaunay triangulation for the set of moving disks (in some metric).
Collisions checks are performed only along the Delaunay edges.
![Page 54: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/54.jpg)
Dynamic VD and DT
Problem Given a set of N moving and/or
changing (i.e. growing) sites Construct the VD (DT) for the set Maintain the VD (DT) dynamically
![Page 55: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/55.jpg)
Dynamic VD and DTDynamic Voronoi diagram
Dynamic Delaunay triangulation
![Page 56: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/56.jpg)
Dynamic VD and DT Dynamic DT is easier to maintain than
dynamic VD in a sense that the coordinates of VD vertices must be calculated, while coordinates of DT vertices (the sites) are already known for any moment of time
As sites move, the topological structure of DT (and VD) changes only at discrete moments of time, which are called topological events.
Topological event involves swapping of the diagonal in a quadrilateral in the DT
In the VD corresponding edge shrinks to zero and another edge starts to grow
![Page 57: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/57.jpg)
Swap condition
INCIRCLE P P P P( , , , )1 2 3 4 0 INCIRCLE P P P P( , , , )1 2 3 4 0 INCIRCLE P P P P( , , , )1 2 3 4 0
P1
P2
P3
P4
P1
P2
P3
P4
P1
P2
P3
P4
![Page 58: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/58.jpg)
INCIRCLE test
1. Power metric x y x y r
x y x y r
x y x y r
x y x y r
poly trajectory
1 1 12
12
12
2 2 22
22
22
3 3 32
32
32
4 4 42
42
42
4
1
1
1
1
( )
To determine the swap time we have to solve INCIRCLE P t P t P t P t( ( ), ( ), ( ), ( ))1 2 3 4 0
2. Euclidean metric
x x r r p
x x r r p
x x r r p
r x y y p
r x y y p
r x y y p
x x y y p
x x y y p
x x y y p
p x x y y r r i
poly trajectoryi i i i
1 4 1 4 1
2 4 2 4 2
3 4 3 4 3
21 4 1 4 1
2 4 2 4 2
3 4 3 4 3
21 4 1 4 1
2 4 2 4 2
3 4 3 4 3
2
42
42
42
8
1 2 3
, , ,
( )
3. Manhattan metric (L)
INCIRCLE P t P t P t P t linear trajectory( ( ), ( ), ( ), ( )) ( )1 2 3 4
![Page 59: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/59.jpg)
Dynamic DT maintenance Preprocessing
Construct the static Delaunay triangulation for the original site distribution
For every quadrilateral in DT calculate the potential topological event. Insert all such events into the priority event queue sorted according to the time order
Iteration Take the next event from the event queue Perform the swap operation and update the data
structure Delete topological events planned for the four
disappearing quadrilaterals from the event queue. Compute the new topological events for the four new
quadrilaterals and insert them into the queue.
![Page 60: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/60.jpg)
Algorithm complexity Time
Constructing initial static DT - O(N log N) Each swap - O(1) Insertion into the priority queue - O(log N) Deletion from the queue can be performed in O(1) Number of topological events depends on the trajectories of
moving sites. It can vary from from O(1) up to O(n3) and even to infinity (in the case of periodic trajectories) When sites do not move, but just grow, we conjecture that
the number of topological events will not be greater than O(N) in general case.
Space DT occupies O(N) Queue requires O(N) because only one event can be
scheduled for each edge in the DT
![Page 61: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/61.jpg)
Geometric Data Structures:
Part 2: Grid files and tree variants
![Page 62: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/62.jpg)
Part 2
Grid file Tree Variants
![Page 63: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/63.jpg)
Geometric data structures
Voronoi diagramsRegular grid (mesh)Grid fileQuad treek-d treeInterval tree
![Page 64: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/64.jpg)
Trees BST – search trees, O(n) AVL, IPR – balanced O(log n) B-trees – for indexing and
searching in data bases: Grow from the leaf level More compact – faster search
B+, B* - used for indexing, store data in leaves, nodes are more full
![Page 65: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/65.jpg)
Operations on spatial trees Spatial queries Point location Stabbing query (which
intervals/polygons contain the point)
Window query – which objects (polygons, points) are intersecting the given window (polygon)
![Page 66: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/66.jpg)
Spatial queries (2D) Point query – find an object
containing a point (find Voronoi region containing a point)
Window query – find an object overlapping a rectangle
Spatial join – join parts of objects satisfying some relationship (intersection, adjacency, containment)
![Page 67: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/67.jpg)
Interval trees Geometric, 1-dimensional tree Interval is defined by (x1,x2) Split at the middle (5), again at the middle (3,7),
again at the middle (2,8) All intervals intersecting a middle point are stored
at the corresponding root.
1 2 3 4 5 6 7 8 9
(4,6) (4,8)
(6,9)
(7.5,8.5)
(2,4)
![Page 68: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/68.jpg)
Interval trees Finding intervals – by finding x1, x2
against the nodes Find interval containing specific value –
from the root Sort intervals within each node of the
tree according to their coordinates Cost of the “stabbing query”– finding all
intervals containing the specified value is O(log n + k), where k is the number of reported intervals.
![Page 69: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/69.jpg)
SAM (Spatial Access Method) Constructs the minimal bounding box (mbb) Check validity (predicate) on mbb Refinement step verifies if actual objects
satisfy the predicate.
![Page 70: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/70.jpg)
The grid Fixed grid: Stored as a 2D array, each entry
contains a link to a list of points (object) stored in a grid.
a,b
![Page 71: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/71.jpg)
Page overflow
Too many points in one grid cell:Split the cell!
![Page 72: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/72.jpg)
Rectangle indexing with grids Rectangles may share different
grid cells Duplicates are stored Grid cells are of fixed size
![Page 73: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/73.jpg)
Grid file vs. grid In a grid file, the index is dynamically
increased in size when overflow happens.
The space is split by a vertical or a horizontal line, and then further subdivided when overflow happens!
Index is dynamically growing Boundaries of cells of different sizes are
stores, thus point and stabbing queries are easy
![Page 74: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/74.jpg)
The quadtree Instead of using an array as an
index, use tree!
Quadtree decomposition – cells are indexed by using quaternary B-tree.
All cells are squares, not polygons. Search in a tree is faster!
![Page 75: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/75.jpg)
Grid file Example of a grid file
![Page 76: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/76.jpg)
Linear quadtree B+ index – actual references to
rectangles are stored in the leaves, saving more space+ access time
Label nodes according to Z or “pi” order
![Page 77: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/77.jpg)
Linear quadtree Level of detail increases as the
number of quadtree decompositions increases!
Decompositions have indexes of a form:00,01,02,03,10,11,12,13, 2,300301 ,302 ,303 ,31 ,32 ,33 Stores as Bplus tree
![Page 78: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/78.jpg)
Finer Grid
R-tree Each object is decomposed and
stored as a set of rectangles Object decomposition: larger areas of
a grid are treated as one element Raster decomposition: each smaller
element is stored separately
![Page 79: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/79.jpg)
R-trees
R-tree Objects are grouped together according to
topological properties not a grid. More flexibility.
R * tree- Optimizes Node overlapping Areas covered by the node
R+ tree – B+ tree, bounding rectangles do not intersect
![Page 80: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/80.jpg)
K-d tree Used for point location, k –number
of the attributes to perform the search
Geometric interpretation – to perform search in 2D space – 2-d tree
Search components (x,y) interchange
![Page 81: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/81.jpg)
K-d tree
a
c
b
ed
d
b
f
f
c a e
![Page 82: Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants](https://reader036.vdocuments.site/reader036/viewer/2022062421/56649d265503460f949fd715/html5/thumbnails/82.jpg)
Conclusions
Numerous applications exist based on Voronoi diagram methodology and tree/grid based data structures.