# Tilling Reaction Diffusion

**URL:** <https://discourse.processing.org/t/tilling-reaction-diffusion/37518>\
**Category:** Processing\
**Created:** [June 13, 2022, 12:59pm UTC](https://discourse.processing.org/t/tilling-reaction-diffusion/37518 "2022-06-13T12:59:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![domini8888](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@domini8888](https://discourse.processing.org/u/domini8888)\
**Post date:** [June 13, 2022, 12:59pm UTC](https://discourse.processing.org/t/tilling-reaction-diffusion/37518/1 "2022-06-13T12:59:32Z")

</div>

Hi all, I’ve recently learned about reaction diffusion, and want to create a set of images that can be tiled on all four sides. I read a paper entitled “Designing the Desert” ([https://www.researchgate.net/publication/296192011\_Designing\_the\_Desert](https://www.researchgate.net/publication/296192011_Designing_the_Desert))

which showcases how to do so. However, I am having troubles understanding the terminologies of what is being said:

“the first step in the process was to generate an initial base pattern. The boundary of this first pattern  
was stored in order to then be used as a part of the initial conditions of the rest of the  
ripple tile simulations, making all the generated patterns match.”

“What was stored from the initial simulation was actually not the generated  
grey level of the pattern image, but the gradients of the intensity levels (i.e. the gradients of the relative amount of the chemical substances simulated, in the original  
interpretation of the equation). In the final simulation process, by weighting the gradients from the border conditions with a standard unbiased simulation, i.e. without  
border conditions, a satisfying flow of the ripples could be achieved, without any  
kinks or discontinuities.”

If I understand correctly, I have to store the gradients. What does this mean?

---

<div class="post-metadata">

**Author:** ![domini8888](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@domini8888](https://discourse.processing.org/u/domini8888)\
**Post date:** [June 13, 2022, 1:00pm UTC](https://discourse.processing.org/t/tilling-reaction-diffusion/37518/2 "2022-06-13T13:00:32Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/6/a610c71e6722d4dce8f6bc77cff80e8520198b0a.jpeg)  
As a reference, this is what I mean^^

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 16, 2022, 3:14am UTC](https://discourse.processing.org/t/tilling-reaction-diffusion/37518/3 "2022-06-16T03:14:29Z")

</div>

Hello @domini8888,

Take a look at this tutorial:  
[https://processing.org/tutorials/pixels](https://processing.org/tutorials/pixels)

I used a link to the sand image here:  
[https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/wp/s/Sand.htm](https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/wp/s/Sand.htm)

Along with this code which is linked in the tutorial:  
[http://learningprocessing.com/examples/chp15/example-15-10-ThresholdDestinationImage](http://learningprocessing.com/examples/chp15/example-15-10-ThresholdDestinationImage)

```auto
source = loadImage("https://www.cs.mcgill.ca/~rwest/wikispeedia/wpcd/images/117/11724.jpg");

```

And was able to generate this:

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/4/6/46603151a3993773e5af0588440083d74e06853f.png)

You will have to change the brightness threshold in the code.

`:)`
