   "Create a new quadtree root node with the given XY position & dimensions."
   [x y w h]
   (QuadtreeNode. x y (* 0.5 w) (* 0.5 h) nil nil))
+
+(defn octree
+  "Create a new octree root node with the given XYZ position & dimensions."
+  [x y z w h d]
+  (OctreeNode. x y z (* 0.5 w) (* 0.5 h) (* 0.5 d) nil nil))
 
 (defn select-with
   "Produces a seq of points in the tree within a given region.

                (commit-path path))))
        (commit-path (assoc this :data p) path)))))

(def ^:const qtchildren [nil nil nil nil])

(defrecord QuadtreeNode [x y w h children data]
  TreeOps

  [s q] (select-with #(g/intersect-shape s %) #(g/contains-point? s %) q))

(def q (time (reduce add-point (quadtree 0 0 100 100) [[55 10] [25 10] [55 11]])))
(def o (time (reduce add-point (octree 0 0 0 100 100 100) [[55 10 25] [25 10 55] [55 11 25]])))
