Barnes Hut and magnetic (Coulomb) forces

Please don't post Bullet support questions here, use the above forums instead.
roxlu
Posts: 2
Joined: Thu Apr 08, 2010 10:26 pm

Barnes Hut and magnetic (Coulomb) forces

Post by roxlu »

Hi,

I'm working on a particle system, which does not use Bullet though I can't think of a better forum to ask. So if I'm at the wrong forum, I sorry.

I'm working working at a particle system where I need to have lots of particles (around 5K or more). I want all particles to be
attracted to a couple of attraction points, though they should keep a distance form these points. Each of the particles tries to keep
some space from the surrounding particels to get a shape like this:

Image


Here I've implement the particles and coulomb force using just 300 particles which works fine. Because I need more I've googled to find some info on implementing a system where each particle interacts with surrounding particles. Someone advised me to use the Barnes Hut algorithm... so I did which works fine as far as normal interaction. Though when I added the coulomb forces it works, but only for each quadrant. Therefore I'm wondering if someone knows more about Barnes Hut or another algorithm I could use?

This is the result when using Barnes Hut together with coulomb forces:

Image

Thanks.