Reaction–diffusion systems are mathematical models which explain how the concentration of one or more substances distributed in space changes under the influence of two processes: local chemical reactions in which the substances are transformed into each other, and diffusion which causes the substances to spread out over a surface in space.
This description implies that reaction–diffusion systems are naturally applied in chemistry. However, the system can also describe dynamical processes of non-chemical nature. Examples are found in biology, geology and physics and ecology. A traditionally common application of such processes is the modeling of naturally occurring textures, such as animal hide patterns.
Reaction-diffusion systems rely on the discretization of a portion of space within which the reaction and diffusion algorithms are repeatedly applied to model the behavior of the system over time.
The ReactP5 Library
The ReactP5 library is a Multi-Threaded Reaction-Diffusion library for Processing and Java. It provides an easy way for building 3-dimensional Reaction-Diffusion simulations. It makes use of multi-threading to speed up the simulation. In addition to the 2 Reaction methods and the simple Diffusion method that is included in the library the possibility is offered to extend the library's functionality by implementing new Reaction and Diffusion methods on top of the existing Generic Reaction/Diffusion Method Class.
Please note that the library is responsible for the simulation of the Reaction/Diffusion system, not it's visualization. For this purpose there exist already excellent libraries for Processing. See Processing Libraries for more information.
Create a new ReactP5 simulation. A Gray-Scott Reaction/Diffusion simulation is created by default:
Set simulation parameters:
Create a few random shapes: ReactP5Generate.randomSphere(rp5); ReactP5Generate.randomCylinder(rp5);
Step the simulation:
Reset the simulation:
Choose a Reaction and Diffusion method:
ReactP5 is released under the BSD License.