Michael Bradford Williams

Home / Programming / Particles in a gravitational field

Here's a simple simulation of particles (the colorful circles) in a (classical) gravitational field generated by randomly placed attractors (the black circles). The controls should be self-explanatory.

Here is a larger version that is more suited to desktop browsers.

Particles:

Attractors:

Gravity:

Confine Particles to Canvas:

Particles contribute to gravity:

Your browser is currently unsupported.