Log In  


Cart [#46979#] | Copy | Code | 2017-12-03 | Link

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-03 21: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

Log in to post a comment


New User | Account Help
:: New User
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-10-22 23:17 | 0.241s | 1572k | Q:18