Interacting particle systems

So far, the particle systems we have looked at have not involved any mutual interactions between the particles. For example, you could let the particles exert a gravitational force on each other. This would create some interesting effects. The trouble is that the number of calculations then becomes very large as the number of particles is increased. For N particles, there are on the order of N2 interactions because every particle interacts with every other particle. Even with only 100 particles, that's 10,000 extra gravity calculations per timestep! The next two examples will illustrate different ways in which we may be able to handle this.

Multiple particles under mutual gravity

In this example, we will modify the ...

Get The Essential Guide to Physics for Flash Games, Animation, and Simulations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.