I scatter particles in a handful of colors and give each color its own rule for which colors it moves toward and which it moves away from. The rules don’t have to match both ways, so one color can chase another that keeps moving off, and the clusters end up crawling, orbiting and splitting apart like small creatures. Press "New rules" to see what else grows, or change how many colors there are.
Each square below shows one rule: whether particles of the row's color move toward or away from particles of the column's color. Light squares mean toward, dark ones mean away. At very short range every particle pushes the others away, which keeps the clusters from collapsing into a point. Drag to turn the view, and pinch or scroll to zoom.
Press H to hide or show these controls.
This experiment needs WebGL, which this browser doesn't offer.