Log In  

Cart #46979 | 2017-12-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

This is a port of Daniel Shiffman's Reaction Diffusion coded in P5 (JavaScript): https://github.com/CodingTrain/Rainbow-Code/blob/master/CodingChallenges/CC_13_ReactionDiffusion_p5.js/sketch.js

Runs on my laptop at about 2-3 seconds per frame, so it takes an hour or more to get going. You can tweak the feed rate (FEED) and kill rate (K) to get radically different emergent patterns.

I may try to optimize it further (believe it or not, I have done some speedups to get it here) and maybe add a menu with some interesting pre-sets, but it is working, albeit very slowly.

Reaction Diffusion is similar to cellular automata like the Game of Life, but can create really amazing organic emergent patterns over time.

P#46960 2017-12-03 14:22 ( Edited 2017-12-04 02:08)

Brought it from around 3 seconds per frame to about a second per frame (on my machine) and added a menu for loading different preset values for FEED and K.

P#46980 2017-12-03 21:08 ( Edited 2017-12-04 02:08)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 12:32:03 | 0.009s | Q:12