SARATH THARAYILST
WRITEUPSCONCEPTSPROJECTSLABABOUT
SARATH THARAYIL
മ
IGARATIPO: AMAZON TRIBUTARIES
/ SYSTEM

Building thoughtful software, writing notes, and shipping experiments across data, AI, and the web.

No cookies, no tracking. Preferences are stored locally in your browser. Anonymous view counts are kept server-side.

Hey, there's a story for the river above/© 2026 Sarath Tharayil/IST --:--:--
← LAB

Particle Life

Jun 6, 2026

Four types of particles, each pair governed by a single attraction constant. Positive attracts, negative repels, zero ignores. Sixteen numbers produce lifelike clusters, predator-prey cycles, and stable molecular structures entirely from local forces.

|
COUNT300
TYPE 0TYPE 1TYPE 2TYPE 3
/ NOTES
HOW IT WORKS

Each particle feels a force from every other particle within a fixed radius. Inside a short inner radius the force is always repulsive (hard-core). Beyond that it follows the attraction constant for that type pair — positive pulls, negative pushes. Friction damps velocity each step.

PRESETS
CellsTypes cluster with their own kind into cell-like blobs.
PredatorCyclic dominance: each type chases the next, is chased by the previous.
ChainsParticles link into long flexible filaments.
ChaosFully random matrix. Unpredictable every run.
WHAT TO TRY

Hit RANDOM repeatedly for surprising emergent behaviours — some matrices produce stable structures, others boil. Increase particle count to see collective effects at scale. Let Predator run for 30+ seconds to see territory cycles.