[Haskell-cafe] octree implementation - followup to "How to model outer space for a MUD"

Michael Litchard michael at schmong.org
Thu Aug 20 20:30:30 UTC 2015

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.


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


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150820/58c5a0fb/attachment.html>

More information about the Haskell-Cafe mailing list