Geometric Data Structures Dr. M. Gavrilova. Lecture Plan Voronoi diagrams Trees and grid variants.

Slides:



Advertisements
Similar presentations
Order-k Voronoi Diagram in the Plane
Advertisements

Polygon Triangulation
Nearest Neighbor Search
Comments We consider in this topic a large class of related problems that deal with proximity of points in the plane. We will: 1.Define some proximity.
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Multidimensional Indexing
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
Hierarchical Voronoi diagrams for spatial data indexing and paging Christopher Gold Dept. Computing & Mathematics, University of Glamorgan, Pontypridd.
The Divide-and-Conquer Strategy
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
Lecture 7: Voronoi Diagrams Presented by Allen Miu Computational Geometry September 27, 2001.
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
1cs542g-term Notes. 2 Meshing goals  Robust: doesn’t fail on reasonable geometry  Efficient: as few triangles as possible Easy to refine later.
Delaunay Triangulation Computational Geometry, WS 2006/07 Lecture 11 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
CPSC 335 Geometric Data Structures in Computer Modeling and GIS Dr. Marina L. Gavrilova Assistant Professor Dept of Comp. Science, University of Calgary,
2-dimensional indexing structure
Lecture 12 : Special Case of Hidden-Line-Elimination Computational Geometry Prof. Dr. Th. Ottmann 1 Special Cases of the Hidden Line Elimination Problem.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 5: Voronoi Diagrams Monday, 2/23/04.
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Delaunay Triangulation.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
Chapter 4: Straight Line Drawing Ronald Kieft. Contents Introduction Algorithm 1: Shift Method Algorithm 2: Realizer Method Other parts of chapter 4 Questions?
Voronoi Diagrams.
R-Trees 2-dimensional indexing structure. R-trees 2-dimensional version of the B-tree: B-tree of maximum degree 8; degree between 3 and 8 Internal nodes.
1 University of Denver Department of Mathematics Department of Computer Science.
Quadtrees and Mesh Generation Student Lecture in course MATH/CSC 870 Philipp Richter Thursday, April 19 th, 2007.
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
Delaunay Triangulations Presented by Glenn Eguchi Computational Geometry October 11, 2001.
Trees for spatial data representation and searching
Dr. Marina Gavrilova Associate Professor, Department of Computer Science, University of Calgary, Calgary, Alberta, Canada. Computational Geometry Algorithms:
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Spatial Data Management Chapter 28. Types of Spatial Data Point Data –Points in a multidimensional space E.g., Raster data such as satellite imagery,
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Order-k Voronoi diagram in the plane Dominique Schmitt Université de Haute-Alsace.
2/19/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Voronoi Diagrams Carola Wenk Based on: Computational Geometry:
Voronoi Diagram (Supplemental)
Spatial Query Processing Spatial DBs do not have a set of operators that are considered to be basic elements in a query evaluation. Spatial DBs handle.
Bin Yao (Slides made available by Feifei Li) R-tree: Indexing Structure for Data in Multi- dimensional Space.
Spatial Indexing Techniques Introduction to Spatial Computing CSE 5ISC Some slides adapted from Spatial Databases: A Tour by Shashi Shekhar Prentice Hall.
UNC Chapel Hill M. C. Lin Computing Voronoi Diagram For each site p i, compute the common inter- section of the half-planes h(p i, p j ) for i  j, using.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
File Processing : Multi-dimensional Index 2015, Spring Pusan National University Ki-Joune Li.
Polygon Triangulation
Autonomous Robots Robot Path Planning (2) © Manfred Huber 2008.
Delaunay Triangulations and Control-Volume Meshing Michael Murphy.
CMPS 3130/6130 Computational Geometry Spring 2017
Spatial Data Management
3. Polygon Triangulation
Query Processing in Databases Dr. M. Gavrilova
Algorithm design techniques Dr. M. Gavrilova
Craig Schroeder October 26, 2004
Computational Geometry Capter:1-2.1
Unstructured grid: an introduction
Kinetic Collision Detection for Convex Fat Objects
File Processing : Multi-dimensional Index
Presentation transcript:

Geometric Data Structures Dr. M. Gavrilova

Lecture Plan Voronoi diagrams Trees and grid variants

Part 1 Voronoi diagram Delaunay triangulation

Voronoi diagrams VD: Thiessen polygons, Delaunay triangulations, tessellations

Tessellation Tessellation is often obtained using Delaunay triangulation.

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

Voronoi Diagram

Voronoi diagram

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 regions Property 2. Voronoi vertex is equidistant from 3 sites. It lies in the center of a circle inscribed between 3 cites Property 3. Empty circle property This inscribed circle is empty, i.e. it does not contain any other sites 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 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.

VD properties

Property 3 (empty circle property). The inscribed circle is empty, i.e. it does not contain any other sites. 1)assume a site q lies inside the inscribed circle C. Then  1,,pvdrqvd C . This contradicts the fact that  1 pVorv . 2)assume q lies on the boundary of the inscribed circle. Then  321,,,,pvdpvdpvdqvd . This contradicts non-circumcircularity assumption. v 1 p 3 p 2 p q

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 only neighbors in the VD) Assume  pVor and  qVor don't have common points. Segment pq crosses the boundary of  pVor at a point x. Assume x belongs to the Voronoi edge between  pVor and  sVor.  qxdpxdqpd,,, ,  sxdpxdspd,,, ,  sxdqxd,,  because  qVorxs x , Then  spdqpd,,  – contradicts the fact that q is the nearest neighbor of p. p s q x

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 21 ss. 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 at p. 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 x r s 2 s 1 p x r l

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)

Delaunay triangulation

DT properties Assumption 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].

VD and DT

DT properties The 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].

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.

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.

Generalized Voronoi diagram A generalized Voronoi diagram (GVD) for a set of objects in space is the 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.

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.

General metrics Generalized distance functions Power Additively weighted Euclidean Manhattan supremum x P d(x,P) P x P x p r  Pxd, P x p r  Pxd,

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

Manhattan and Supremum VD Supremum bisectors Manhattan bisectors Manhattan diagram and Delaunay triangulation Supremum diagram and Delaunay triangulation

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.

Algorithmic Strategies Incremental Divide-and-conquer Sweep-line/plane Dimension reduction Geometric decomposition

Algorithmic Strategies Algorithm development techniques on example of Voronoi Diagrams Incremental construction Divide and conquer Sweep-plane Geometric transformations Dynamic data structures

Incremental construction INCIRCLE condition power Euclidean Supremum Polynomial of 4 th order in the plane Polynomial of 8 th order in the plane System of linear equations and inequalities in the plane

Incremental construction Incremental method outline Insert new site P Perform swap operations on quadrilaterals where the empty-sphere condition is not satisfied Method complexity is O(n 2 ) in the plane.

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

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.

Sweep-plane algorithm An example of a sweep-plane construction of a Voronoi diagram in L 1 metric

Cones in L 1 Sweep-plane algorithm

Sweeping the cones Sweep-plane algorithm

Parabolas sweep direction Sweep-plane algorithm

Site event Sweep-plane algorithm

Site event Sweep-plane algorithm

two half-bisectors are created one is growing Sweep-plane algorithm

The half-bisector changes its direction Sweep-plane algorithm

Site event 2 half-bisectors created Sweep-plane algorithm

The half-bisector Changes its direction Sweep-plane algorithm

Circle event Triangle added to DT 2 half-bisectors deleted 1 half-bisector created Sweep-plane algorithm

Half-bisector changes its direction Sweep-plane algorithm

No more events Sweep-plane algorithm

Resulting Voronoi diagram and Delaunay triangulation Sweep-plane algorithm

Waves in Manhattan metric Waves in power metric

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

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(n 2 ).

Swap method Voronoi to power (a) p (b) p e e e * 1 p p p p p p 3 4 e *

Dynamic data structures – swap application Approach 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.

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

Dynamic VD and DT Dynamic Voronoi diagram Dynamic Delaunay triangulation

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

Swap condition

INCIRCLE test 1. Power metric To determine the swap time we have to solve 2. Euclidean metric 3. Manhattan metric (L  )

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.

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(n 3 ) 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

Geometric Data Structures: Part 2: Grid files and tree variants

Part 2 Grid file Tree Variants

Geometric data structures Voronoi diagrams Regular grid (mesh) Grid file Quad tree k-d tree Interval tree

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

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)

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)

Interval trees Geometric, 1-dimensional tree Interval is defined by (x 1,x 2 ) 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 (4,6) (4,8) (6,9) (7.5,8.5) (2,4)

Interval trees Finding intervals – by finding x 1, x 2 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.

SAM (Spatial Access Method) Constructs the minimal bounding box (mbb) Check validity (predicate) on mbb Refinement step verifies if actual objects satisfy the predicate.

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 overflow Too many points in one grid cell: Split the cell!

Rectangle indexing with grids Rectangles may share different grid cells Duplicates are stored Grid cells are of fixed size

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

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!

Grid file Example of a grid file

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

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, ,302,303,31,32,33 Stores as Bplus tree

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

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

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

K-d tree a c b e d d b f f cae

Conclusions Numerous applications exist based on Voronoi diagram methodology and tree/grid based data structures.