Mitosis in the Gray-Scott model: writing shader-based chemical simulations
The article explains the Gray-Scott model of reaction-diffusion systems, highlighting GPU advantages for simulations, introducing shader-based programming with GLSL ES, and encouraging experimentation to observe complex emergent patterns.
Read original articleThe article discusses the Gray-Scott model of reaction-diffusion systems, which illustrates how simple chemical reactions can lead to complex patterns through simulation. It emphasizes the importance of using GPUs for these simulations due to their ability to perform parallel computations efficiently, as opposed to CPUs, which would be too slow. The author provides a beginner-friendly introduction to writing shader-based simulations using GLSL ES, specifically focusing on the Gray-Scott model. This model involves two chemical species, A and B, undergoing an auto-catalytic reaction, with diffusion playing a crucial role in the emergence of patterns. The article outlines the basic principles of chemical reactions, diffusion, and the specific characteristics of the Gray-Scott model, including the feed and kill rates that influence the system's dynamics. It also explains the concept of shaders, which are programs that run on GPUs to render graphics, and how they can be utilized to simulate the Gray-Scott model effectively. The author encourages experimentation with the simulation to observe emergent behaviors and patterns, highlighting the potential for complex visualizations in scientific programming.
- The Gray-Scott model demonstrates how simple chemical reactions can create complex patterns.
- GPUs are preferred for running simulations due to their parallel processing capabilities.
- The article serves as an introduction to writing shader-based simulations using GLSL ES.
- Key concepts include chemical reactions, diffusion, and auto-catalytic reactions.
- The simulation allows for interactive experimentation to observe emergent behaviors.
Related
A simplified Python simulation of diffusion
Physicist Richard Feynman's teaching style is explored through Python simulations on diffusion. The tutorial simplifies physics concepts, emphasizing coding and optimization with Python modules like turtle, NumPy, and Matplotlib.
Introduction to Realtime Fluid Simulation for Programmers and Technical Artists
The article introduces real-time fluid simulation for programmers and artists, focusing on geometrical concepts in Unity 3D. It discusses fundamental behaviors, initial flaws, and encourages developing a more accurate simulation.
SIMD Matters
The article discusses SIMD's role in enhancing CPU performance in game development, particularly through graph coloring in Box2D, which improves processing efficiency and significantly outperforms scalar methods.
SIMD Matters: Graph Coloring
The article discusses SIMD's role in enhancing CPU performance in game development, particularly in Box2D, highlighting challenges, the use of graph coloring, and benchmarks showing significant performance improvements over scalar implementations.
Fluid Simulation and Web Assembly
Eric Hayes developed an interactive fluid simulation in C++ using Smoothed Particle Hydrodynamics, optimizing performance with a grid system and addressing challenges related to stability and Web Assembly compatibility.
This was my first time writing a shader. I was just playing around on shadertoy when I realized I could implement this chemical model that has fascinated me for quite some time. I'm really happy with how well my results align with results from other people who have done this before me.
While writing the article, I noticed that the same kind of shader implementation has already been done before.
Feel free to ask me anything about the implementation or the chemical model
Unfortunately, my writeup isn't anywhere near as coherent on the technical/engine details, and the actual code is a right mess. It's more focused on the pattern family design.
Overall, my results came out very similar to Lenia in many ways, and some discovered patterns also directly resemble reaction diffusion.
---
https://slackermanz.com/understanding-multiple-neighborhood-...
https://github.com/GollyGang/ready
Some fun ones from me can be found in Patterns/Experiments/DanWills
Related
A simplified Python simulation of diffusion
Physicist Richard Feynman's teaching style is explored through Python simulations on diffusion. The tutorial simplifies physics concepts, emphasizing coding and optimization with Python modules like turtle, NumPy, and Matplotlib.
Introduction to Realtime Fluid Simulation for Programmers and Technical Artists
The article introduces real-time fluid simulation for programmers and artists, focusing on geometrical concepts in Unity 3D. It discusses fundamental behaviors, initial flaws, and encourages developing a more accurate simulation.
SIMD Matters
The article discusses SIMD's role in enhancing CPU performance in game development, particularly through graph coloring in Box2D, which improves processing efficiency and significantly outperforms scalar methods.
SIMD Matters: Graph Coloring
The article discusses SIMD's role in enhancing CPU performance in game development, particularly in Box2D, highlighting challenges, the use of graph coloring, and benchmarks showing significant performance improvements over scalar implementations.
Fluid Simulation and Web Assembly
Eric Hayes developed an interactive fluid simulation in C++ using Smoothed Particle Hydrodynamics, optimizing performance with a grid system and addressing challenges related to stability and Web Assembly compatibility.