Tuesday, April 3, 2018

software engineering - How could you parallelise a 2D boids simulation



How could you program a 2D boids simulation in such a way that it could use processing power from different sources (clusters, gpu).


boids example


In the above example, the non-coloured particles move around until they cluster (yellow) and stop moving.


The problem is that all the entities could potentially interact with each other although an entity in the top left is unlikely to interact with one in the bottom right. If the domain was split into different segments, it may speed the whole thing up, But if an entity wanted to cross into another segment there may be problems.


At the moment this simulation works with 5000 entities with a good frame rate, I would like to try this with millions if possible.


Would it be possible to use quad trees to further optimise this? Any other suggestions?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...