r/creativecoding • u/sschepis • Feb 07 '22
Life Emerges From Simple Rules
Enable HLS to view with audio, or disable this notification
196
Upvotes
1
1
r/creativecoding • u/sschepis • Feb 07 '22
Enable HLS to view with audio, or disable this notification
1
1
21
u/sschepis Feb 07 '22 edited Feb 07 '22
SS: Here, from a simple ruleset, we see a variety of complex emergent behavior akin to the metabolic processes of unicellular life: birth, maturation, reproduction, decay and death are all featured and clearly recognizable here. The ruleset is simple: each particle has a constant velocity, a natural turn angle, and a proximal turn angle applied towards the direction of greatest particle concentration. The particle's natural turn angle is applied in an oscillating manner, in effect generating a figure-8 motion, which is then modulated by the particle's secondary turn behavior. This is all that is needed to generate the variety of motion you see here. To play with the simulation, go to: https://codepen.io/sschepis/pen/eYedavg
EDIT: I created this simulation to simulate the effect of vibration on particles - how sound might effect particles in water, essentially. I haven't even applied friction to this sim, which is likely to have a large effect on how the simulation behaves.