SlideServe
Menu
Préférences
© SlideServe · v2026

Computational Geometry

ethel avatar
17 diapositives · 491 Views · Aug 14, 2014

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.

Computational Geometry - slide 1
01 / 17Computational Geometry
1 / 17

Télécharger la présentation

Computational Geometry
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Computational Geometry Piyush Kumar (Lecture 5: Range Searching) Welcome to CIS5930

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

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

  4. Example: Points in R2 Q1 Q2

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

  6. 7 4 12 2 5 8 15 2 4 5 7 8 12 15 19 Range Trees (1D) 6 17 2 4 5 7 8 12 15 19 Counting ? Reporting?

  7. Range Trees (2d) P3 P8 P5 P2 P6 P4 P7 P1 P3 P2 P4 P1 P1 P2 P3 P4 P5 P6 P7 P8

  8. 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(logd-1n) Space: O(nlogd-1n) • Construction time : O(nlogd-1n)

  9. 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: • http://www.cs.umd.edu/~mount/ANN/ • Look at kd_tree.cc and kd_tree.h

  10. 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 widestspread. • Efficiency of query processing drops as dimensions increase (becomes almost linear). However, the space requirement remains linear : O(n.d)

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

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

  13. 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(n1-1/d)

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

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

  16. 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?

  17. More on the Chalk board…