Computational Geometry Piyush Kumar (Lecture 5: Range Searching) Welcome to CIS5930.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Orthogonal range searching. The problem (1-D) Given a set of points S on the line, preprocess them to build structure that allows efficient queries of.
Parallel Algorithms in Computational Geometry
COSC 6114 Prof. Andy Mirzaian. References: [M. de Berge et al] chapter 5 Applications: Data Base GIS, Graphics: crop-&-zoom, windowing.
Searching on Multi-Dimensional Data
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Orthogonal Range Searching 3Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.
I/O-Algorithms Lars Arge Aarhus University February 27, 2007.
Computational Support for RRTs David Johnson. Basic Extend.
Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.
Lecture 5: Orthogonal Range Searching Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Approximate Range Searching in the Absolute Error Model Guilherme D. da Fonseca CAPES BEX Advisor: David M. Mount.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
I/O-Algorithms Lars Arge University of Aarhus March 1, 2005.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
Spatial Information Systems (SIS) COMP Spatial access methods: Indexing.
Lars Arge1, Mark de Berg2, Herman Haverkort3 and Ke Yi1
I/O-Algorithms Lars Arge Aarhus University March 5, 2008.
Data Structures for Orthogonal Range Queries
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 - Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
O RTHOGONAL R ANGE S EARCHING الهه اسلامی فروردین 92, 1.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
AALG, lecture 11, © Simonas Šaltenis, Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees and.
Spatial Indexing. Spatial Queries Given a collection of geometric objects (points, lines, polygons,...) organize them on disk, to answer point queries.
 This lecture introduces multi-dimensional queries in databases, as well as addresses how we can query and represent multi- dimensional data.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
Data Structures for Computer Graphics Point Based Representations and Data Structures Lectured by Vlastimil Havran.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Trees for spatial data representation and searching
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
UNC Chapel Hill M. C. Lin Orthogonal Range Searching Reading: Chapter 5 of the Textbook Driving Applications –Querying a Database Related Application –Crystal.
14/13/15 CMPS 3130/6130 Computational Geometry Spring 2015 Windowing Carola Wenk CMPS 3130/6130 Computational Geometry.
B-trees and kd-trees Piotr Indyk (slides partially by Lars Arge from Duke U)
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
Multi-dimensional Search Trees
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Computational Geometry Piyush Kumar (Lecture 10: Point Location) Welcome to CIS5930.
2IL50 Data Structures Fall 2015 Lecture 9: Range Searching.
Orthogonal Range Search
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Lecture 2: External Memory Indexing Structures CS6931 Database Seminar.
Multi-dimensional Search Trees CS302 Data Structures Modified from Dr George Bebis.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2013.
CMPS 3130/6130 Computational Geometry Spring 2015
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Hierarchical Data Structure in Game Programming Yanci Zhang Game Programming Practice.
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
CS552: Computer Graphics Lecture 28: Solid Modeling.
School of Computing Clemson University Fall, 2012
CSE 554 Lecture 5: Contouring (faster)
Geometric Data Structures
CMPS 3130/6130 Computational Geometry Spring 2017
Spatial Indexing.
Multidimensional Range Search
Spatial data structures -kdtrees
Modeliranje kompleksnih modelov
KD Tree A binary search tree where every node is a
Orthogonal Range Searching and Kd-Trees
Segment Trees Basic data structure in computational geometry.
Reporting (1-D) Given a set of points S on the line, preprocess them to build structure that allows efficient queries of the from: Given an interval I=[x1,x2]
Orthogonal Range Searching Querying a Database
CMPS 3130/6130 Computational Geometry Spring 2017
Modeliranje kompleksnih modelov
Presentation transcript:

Computational Geometry Piyush Kumar (Lecture 5: Range Searching) Welcome to CIS5930

Range Searching : recap 1D Range search kD trees Range Trees Fractional Cascading

Range Searching Preprocess a set P of objects for efficiently answering queries. Typically, P is a collection of geometric objects (points, rectangles, polygons) in R d. Query Range, Q : d-rectangles, balls, halfspaces, simplices, etc.. Either count all objects in P  Q or report the objects themselves. Courtesy Bhosle

Q1Q1 Example: Points in R 2 Q2Q2

Applications  Databases  Spatial databases (G.I.S.)  Computer Graphics  Robotics  Vision

Range Trees (1D) Counting ? Reporting?

Range Trees (2d) P4P4 P3P3 P2P2 P1P1 P3P3 P2P2 P4P4 P1P1 P1P1 P2P2 P3P3 P4P4 P8P8 P7P7 P6P6 P5P5 P5P5 P8P8 P6P6 P7P7

Query and Space Complexity (counting) 1D  Query : O(log n) Space: O(n) 2D  Query : O(log n) Space O(nlogn)  Construction time : O(nlogn) d-D  Query : O(log d-1 n) Space: O(nlog d-1 n)  Construction time : O(nlog d-1 n)

Kd-Trees a typical struct  Int cut_dim;// dim orthogonal to cutting plane  Double cut_val;// location of cutting plane  Int size; // number of points in subtree The best implementation of kd-trees I know of:   Look at kd_tree.cc and kd_tree.h

kD-Trees (k-dimensional Trees) 1-d tree : split along median point and recursively build subtrees for the left and right sets. Higher dimensions : same approach, but cycle through the dimensions. Or, select the next dimension as the one with the widest spread. Efficiency of query processing drops as dimensions increase (becomes almost linear). However, the space requirement remains linear : O(n.d)

kD-Trees (Contd.) a b c d e f g f n m l k j i h o l m j e i g h b k a d c n o

Q(n) = 2.Q(n/4) + 1 Q(n) = O(n 1/2 ) i.e. Query answered in O(n 1-1/d + m) time where m is the output size kD-Trees (Contd.) Query complexity : How many cells can a query box intersect ? Any axis parallel line can intersect atmost 2 of these 4 cells. Each of these 4 cells contain exactly n/4 points. Let us consider a facet of the query

Kd-Tree Summarizing  Building (preprocessing time): O(n log n)  Size: O(n)  Range queries: O(sqrt(n)+k) In higher dimensions  Building: O(dnlogn)  Size: O(dn)  Counting Query: O(n 1-1/d )

QuadTrees 4-way partitions Linear space Used in real life more than kd-trees

Octrees 3D Version of Quadtrees 8 child nodes Applications  Range searching  Collision detection  Mesh generation  Visibility Culling  Computer games

General Sets of points We assumed till now that the x,y coordinates of the points are distinct and do not overlap the coordinates of the query. How do we relax this?

More on the Chalk board…