1,000 Particles in Action. Part 2.
November 9th, 2008 : Nik RowellActually, this one uses 10,000 particles, and the equation:
float force = planet.mass * particle.mass / distanceSquared;
(Thanks Keith Peters!)
Particles are regenerated if they begin shooting off into space. Near the end of the animation, I decrease the center planet’s mass until it becomes negative, changing gravity into repulsion…
Tags: Animation, Code, Experiments, Object-Oriented-Programming, Physics, Processing, Video











