PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

Related simulators

Continue with similar topics in this category — or all 85 in Classical Mechanics.

View category →
NewSchool

1D Force Field

Launch Simulator

U(x) presets, F = −U′, bead on potential, phase (x,v) and E(t).

NewSchool

Boids (Flocking)

Launch Simulator

Separation, alignment, cohesion on a torus; cursor as predator cue.

School

Spring-Mass System

Launch Simulator

Simple harmonic motion with adjustable spring constant and damping.

NewSchool

Inclined Plane: Work & η

Launch Simulator

W = F·s, friction and gravity work, ΔU, efficiency η = ΔU/W_F; slide-down preset.

FeaturedSchool

Force Diagram Builder

Launch Simulator

Place objects, add force vectors, see net force and resulting acceleration.

NewSchool

Spring Pendulum

Launch Simulator

2D elastic pendulum: swing and spring stretch together — energy swaps between modes; try chaotic-looking presets.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Classical Mechanics/Particle Life

Particle Life

Six types, pairwise matrix forces on a torus — clusters, worms, foam presets.

Interaction

Force matrix (row feels column)

Green = attract, red = repel. Read-only; switch presets to change it.

62 px
1.05
0.88

Six species, toroidal world, O(N²) demo. Change preset or gain and watch clusters, filaments, or churn.

Measured values

Particles280
Types6

About this model

Particle Life explores a simplified model of emergent collective behavior based on pairwise forces. It simulates a population of particles moving on a two-dimensional toroidal surface, where each particle is assigned one of six types. The core physics is governed by a custom force matrix that defines an attractive or repulsive interaction strength between every pair of types. This creates a synthetic, non-conservative force field where particles experience a net force calculated by summing contributions from all nearby particles according to their type-pair value. The simulation integrates Newton's second law of motion (F=ma) to update particle velocities and positions, while incorporating a velocity damping term to approximate viscous drag and prevent energy divergence. Key simplifications include the absence of explicit potentials (like Lennard-Jones), the use of a distance cutoff for forces, and the toroidal boundary conditions which eliminate edges. By interacting with the presets—which yield clusters, linear 'worms', or gaseous foams—students learn how complex, lifelike structures can emerge from simple local rules. This connects to principles in statistical mechanics, self-organization, and agent-based modeling, illustrating how macroscopic order arises from microscopic interactions without centralized control.

Who it's for: Undergraduate students in physics, computer science, or complex systems exploring emergent phenomena and agent-based modeling, as well as educators teaching Newtonian mechanics and numerical integration.

Key terms

  • Newton's Second Law
  • Pairwise Forces
  • Toroidal Boundary Conditions
  • Emergent Behavior
  • Numerical Integration
  • Self-Organization
  • Agent-Based Model
  • Viscous Damping

How it works

A cousin of reaction–diffusion visually: structure from nothing but short-range attraction and repulsion between labels.

Frequently asked questions

Are the forces in this simulation conservative, like gravity or spring forces?
No. The forces are defined by an arbitrary matrix and are not derived from a potential energy function. This means energy is not conserved; it can be injected or dissipated by the force rules and the damping term. This is a deliberate simplification to explore a wider range of dynamical behaviors, unlike real-world closed physical systems.
Why does the simulation use a torus (wrapping edges) instead of a box with walls?
Toroidal boundaries eliminate edge effects, ensuring all particles have identical environmental conditions. This is common in computational physics to model bulk properties of infinite systems or to study intrinsic dynamics without boundary reflections, which can simplify the analysis of emergent patterns.
What real-world systems does this abstract model relate to?
While highly stylized, it shares conceptual links with models of flocking birds, cell sorting in biology, and phase separation in materials. It demonstrates how simple attraction/repulsion rules between different 'species' can lead to sorting, clustering, and pattern formation seen in complex systems.
How does the damping term affect the physics?
Damping multiplies velocity each step by a factor that is time-scaled so the slider matches the same decay at ~60 FPS regardless of frame rate. It removes kinetic energy continuously, preventing the non-conservative type forces from heating the system without bound, and lets patterns settle into stable dynamic structures rather than a chaotic gas.
Can I edit the force matrix myself?
Not cell-by-cell in this demo — the UI exposes three curated presets (cells, worms, foam), each with a fixed type×type matrix you can preview in the control panel. Switching presets, plus gain and interaction radius, is enough to see qualitatively different collective outcomes. Designing an arbitrary target pattern from a free matrix is an inverse problem and is intentionally out of scope here.