Controls | |
Physical constants | Gravity:Decay:Mouse density: |
New group parameters | Size:Radius:Color (empty for random): |
New particle parameters | Radius:Density: |
Toggles | New particles are fixedTrace new particle pathsBounce off edgesDraw traces |
ctrl + click (or double tap) to place a new group
drag before letting go to set the new group's velocity
hold down the mouse to interact
Particles is a 2D N-body gravity simulator. It simulates any number of particles, which may have different sizes and densities. You can use the mouse to interact with the particles, which are attracted to your mouse as if it were a particle. What follows is a description of different options or features, and what each does:
The global gravity constant. The larger this value, the greater effect particles have on one another.
This may be positive, negative, or zero. If negative, particles will be repulsed by one another.
Decay allows you to gradually slow down the particles.
Particles are slowed down on every frame, which occur approximately every 15 milliseconds.
The decay value is the percentage of motion taken away from the particles each frame, and may be positive, negative, or zero.
Particles have the following properties:
Half the width of the particle. This contributes to the mass of the particle.
Should be greater than zero.
The density of the particle. This contributes to the mass of the particle.
This may be positive, negative, or zero. If negative, this particle will push other particles away. If zero, this particle will have no effect on other particles.
The inner color of the particle.
This is also the color that gets drawn on the trace image (if enabled).
Individual particles may or may not be drawn on the trace image (if enabled).
This is toggled by enabling the "Trace new particle paths" checkbox.
Particles may be fixed, in which case they will never move.
They will still affect other particles, but will not themselves be affected.
Particles are added to the simulation in groups. Every particle in a group shares the same properties of size, density, color, and initial velocity. The folowing settings apply to groups:
The number of particles in a single group
The initial radius of a new group. Particles are spawned in a spiral pattern within this radius.
Should be positive or zero.
You can click and drag whwn creating a group to incur an initial velocity upon the group. In this case, every particle in the newly spawned group will start out with that same initial velocity.
Particles may draw on a background image, called the trace image. This does not get reset each frame, but gets overdrawn. The trace image may be cleared, and can also be saved.
When pressed, the mouse is treated as a particle with a 1-pixel radius and the chosen density. That density may be positive, in which case particles will be attracted to it, or negative, in which case particles will be repulsed by it.