On 12.08.2010, at 20:09, Alexandre Bergel wrote:
Hmmm, I'm looking for a quad tree implementation :) Is it bound to Mondrian?
Yeah! Load Mondrian (http://www.squeaksource.com/Mondrian.html), it contains MOQuadTree. It comes with very few tests however. MOQuadTree is not bound to Mondrian. However, I find convenient to leave it in Mondrian.
What you need it for? Just curious.
I build a fun application using pier. It is still small and very experimental. It's about wine. And spatial/geographical information is important for the site. Quadtrees are extremely useful for geographical applications. Usually the world is divided into a mesh of equal distant squares. This squares map onto the deepness levels of a quadtree. Tile graphics like google maps are managed in a similar way. This way round it is easy to find important spots (called POI = points of interest) fast. You just need to convert latitude/longitude in x/y dimensions and with an additional parameter of zoom a quad tree gives you everything you wanna know. For the opposite direction (finding areas of most interest without having discrete dimensions) R-Trees are pretty useful. They are not balanced by area they occupy but balanced through the amount of data that is in or near to a certain spot.
Just in case you wanted to know the longer version
Norbert