Octrees

An optimized data structure for spacial partitioning

Problem Statement

How can we represent objects in 3-Space such that locations can be queried in a time efficient manner?

Answer

Structure the data so that the we reduce the problem to a simple recursive tree search

How Does it Work?

In 1 Minute :)

Create a tree where each branch is an octant of space

Place each object into the tree based on the values of it's location 3-tuple

Why?

So that you know where things are in relation to each other without doing any vector math

Why?

Two players can't be in melee combat if they are in different branches of the tree

Applications

  • GIS
  • Pathfinding for drones
  • 3D Games (Collision Detection)
  • Virtual and Augmented Reality

Implementation

Future Directions

Extensions to 4+ Dimensional Spaces!!

Detecting collisions in semantic knowledge domains

References

Octrees in 5 minutes

By Matt Sprague

Octrees in 5 minutes

  • 1,001