Dear reader,
I'm working on a (c++, opengl) project where I need to have lots of particles which influence eachother, if I'm correct this is called a nbody problem. Does someone knows what solutions there are for algorithms like this.
I know the barnes hut algorithm and maybe I can peek around openCL, though I'm not just wondering if you maybe used other solutions.
The code which I'll create will have lots of:
for(int i = 0; i < num_particles; ++i) {
for(int j = i+1, j < num_particles; ++j)
dist = distance(particles[i],particles[j]);
if(dist > limit) {....}
}
}
Kind regards, Pollux