Aww. Indeed, if I remember Hanno's talks, he was using meticiously sized cubes that worked well with the cache.
by the way, the way to get bird rather than boid/fish swarms is to add gravity, and let the birds bank and roll and pitch and yaw. On Jan 28, 7:46 pm, Jon Harrop <j...@ffconsultancy.com> wrote: > On Wednesday 28 January 2009 18:09:30 bOR_ wrote: > > > Errata: Hanno works in Groningen. As I work in Utrecht, I sort of > > automatically appended 'Utrecht' after 'Theoretical Biology'. > > > Ontopic: There is a thing called Hilbert curves that you could use. > >http://en.wikipedia.org/wiki/Hilbert_curve > > > You could define a 1d array, and translate the bird 2d position into a > > position in that array, using the hilbert curve. Now, if you want to > > have a subset of nearby birds, you can just take a subarray of that > > array around the bird of interest, and base your bird behaviour on the > > birds in that subarray. > > > Not sure what the best data structure is to implement this in, or what > > way to do it in clojure, but it gives you an idea. > > That is an academically fascinating idea that I once persued when I was an > academic (in the context of dynamical matrix preconditioning). :-) > > Unfortunately, it does not work out well in practice despite the existence of > some great Hilbert curve libraries: > > http://www.tiac.net/~sw/2008/10/Hilbert/moore/index.html > > The reason is that cache locality much prefers striping over suitably-sized > tiles rather than fancy curves. > > -- > Dr Jon Harrop, Flying Frog Consultancy Ltd.http://www.ffconsultancy.com/?e --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---