It looks like Octree is what I want if I can solve a particular problem. First let me articulate what I am looking for.

(1) Objects in 3-d space with no spatial extent. Collision is determined by two objects occupying the same point.'

(2) Efficient insert-delete-update

#2 seems to be the problem. I found this library, thankfully. I believe it's exactly what I am looking for, but for quadtrees.

https://github.com/AshleyMoni/QuadTree

I'm a little overwhelmed as this is a new data structure for me. I believe if I can grok what is going on in this library, I can take these ideas and extend them to the octree. I'm referring specifically to this module

https://github.com/AshleyMoni/QuadTree/blob/master/Data/QuadTree/Internal.hs

And these functions

setLocation :: Eq a => Location -> a -> QuadTree a -> QuadTree a setLocation = set . atLocation

atLocation (Having difficulty cutting and pasting this to mail.)

I'd like to be able to visualize how the tree is being compressed, it may help to be able to see what happens to the tree when it's not compressed.

Does anyone have a pointer or advice in how to break this library down in parts to help me grok, in a way that will help me extend to octree?