[vtkusers] Multi Body Collission

Michael Jackson mike.jackson at bluequartz.net
Wed Nov 26 11:42:24 EST 2008


On Nov 26, 2008, at 11:30 AM, Dominik Szczerba wrote:

>> Well, the naive approach is to do an n^2 approach and compare each  
>> body against all the other bodies in the list to see if they collide.
>
> A straight forward improvement would be to compare the bounding  
> boxes first in the search for possible collision candidates.


Yep.. that is in that part about "better ways".. :-)

Plus you don't really do an n^2. you do the olde:

for (i = 0; i < max-1; ++i)
   for (j = i + 1; j < max; ++j)
      // Get the bounding box
      // Compare the bodies

Then there is the neighborhood approach to partition the simulation  
space...

I'd have to look up my MD code to get the other optimizations.


_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio






More information about the vtkusers mailing list