{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

JonLeonardSpacePartitioningDataStructures

JonLeonardSpacePartitioningDataStructures - Space-based...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Space-based Partitioning Data Structures and their Algorithms Jon Leonard
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Purpose Space-based Partitioning Data Structures are an efficient way of organizing data that lies in an n-dimensional space 2D, 3D, even 4D and beyond Reasoning about the data is usually much easier Bottom Line: Cut down on the search space
Background image of page 2
Example 1 X Values Y Values 1 3 5 6 9 3 3 1 8 8 4 9 1 2 2 4 8 1 4 2 7 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Outline Quadtrees Octrees Binary Space Partitions (BSP) Kd-Trees R-Tree Bounded Volume Hierarchy (BVH)
Background image of page 4
Outline Quadtrees Octrees Binary Space Partitions (BSP) Kd-Trees R-Tree Bounded Volume Hierarchy (BVH)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Quadtree Origins The term Quadtree was coined by Raphael Finkel and J.L. Bentley in 1974 A data structure to store data in two dimensions Follows the same intuition as a binary tree Binary Tree: I have one range of data I want to partition Quadtree: I have two ranges of data I want to partition
Background image of page 6
Quadtree Quadtrees represent finite, square areas The internal nodes of a quadtree are also finite, square areas that make up a quadrant of their parent node's region As such, each internal node has four children, one for each quadrant The leaf nodes of a quadtree hold a finite number of elements Filled leaf nodes will break into four quadrants and the data is inserted into the quadrants
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Quadtree
Background image of page 8
Quadtree Insert Code quadtree_insert(quadtree node, data_type data) if(node has quadrants) if in first quadrant quadtree_insert(node.firstQuad, data) if in second quadrant quadtree_insert(node.secondQuad, data) ... else if node.data.size < threshold node.data.insert(data) else break up into quadrants insert existing data into quadrants insert data into quadrant
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Quadtree Alternative Implementations
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}