POV-Ray : Newsgroups : povray.advanced-users : Quadtrees/Octrees: Possible with POV's SDL? : Re: Quadtrees/Octrees: Possible with POV's SDL? Server Time
28 Sep 2024 06:09:09 EDT (-0400)
  Re: Quadtrees/Octrees: Possible with POV's SDL?  
From: Christian Froeschlin
Date: 31 Mar 2011 15:59:12
Message: <4d94dd10$1@news.povray.org>
> I'm trying to find an efficient way to test all points within a set 
> against each other. Quadtrees/octrees seem like the way to go, but... it 
> appears that I need arrays containing vectors with other arrays mixed 
> in. POV doesn't allow that sort of thing.

You might be better off exporting data from another programming
language. Also, how to proceed might depend on whether your main
focus is on non-intersection (where you only need to track close
neighbors) or gravity simulation (where you need to consider
points that are farther away as well. Better than efficient
tests is of course if you can avoid having to test each
point against every other point.

Your scene reminds me a bit of astronomical simulations for
star/galaxy formation and the likes. Their point counts are now
over the 10 billion makr (i.e. 10^10) ;) Typically these use
a hierarchical data structure, i.e. you group points into
clumps of matter and over longer distances only consider
the total attraction between increasingly larger clumps,
ignoring the constituent points.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.