Reaction-Diffusion Code

Reaction-Diffusion Systems
http://en.wikipedia.org/wiki/Reaction-diffusion
Two chemicals react to each other (autocatalytic reaction) and diffuse at different speeds > patterns emerge. Simulated as a cellular automata.

see http://www.evsc.net/projects/reaction-diffusion

Instructions
draw with the mouse on the screen to activate the chemicals.

change parameters in setup() to achieve different patterns

diffA … diffusion rate for chemical A
diffB … diffusion rate for chemical B
vDiffA … vary diffusion parameter for chemical A over x-axis
vDiffB … vary diffusion parameter for chemical B over y-axis
speed … reaction speed
vSpeed … vary reaction speed over y-axis
Alpha … growth constant
vAlpha … vary growth constant over x-axis
betaMean … mean decay parameter
betaNoise … noise in decay parameter
vNoise … vary noise over y-axis

key commands

r … start/stop simulation
x … clear screen and reset
c … init chemical with small square in center (for symmetrical patterns)
b … blur pixels
n … display as black/white bitmap (use blur+bitmap for bolder line patterns)
p … capture image
f … toggle fullscreen

done with v0.06

http://vimeo.com/4519153

rdPattern.zip

Looks great. Love your blog too.

JGL

very interesting, thx for sharing.

Nice, I’ve actually been trying to simulate this with cellular automata, but didn’t know how. So please can you tell me how I can do this myself?

Great

Thanks for sharing this! To @evsc i’ve seen your web pages… awesome works! :smiley:
Do you think it is possible make this in GLSL code?

[quote author=“kalwalt”]Thanks for sharing this! To @evsc i’ve seen your web pages… awesome works! :smiley:
Do you think it is possible make this in GLSL code?[/quote]

Thanks!!

I am sure it’s possible. But i am not really a GLSL expert. Somehow never found the time and/or project to really dig into it. Shame, yes.

Why don’t you give it a try?

Thanks!!

I am sure it’s possible. But i am not really a GLSL expert. Somehow never found the time and/or project to really dig into it. Shame, yes.

Why don’t you give it a try?

i have bought the OpenGL library books for doing this and for other idea also. i’d like to use OpenCL (but i’have to bought a new pc…). Me too i m not a GLSL expert. I’m not a developer (self made developer…!!), I’m studing Sculpture(the master course) at Academy of fine arts in Bologna. but i m interested in interactivity and i like to use different media for my expression.Probably you will found in the next time some my post about CA in GLSL ! :slight_smile:
see you
cheers

Hey Eva, Thanks for sharing this, looks gorgeous! … But the file link is dead… do you still have the code somewhere around ?

1 Like