Create reaction diffusion
create_reaction_diffusionBuild a Gray-Scott reaction-diffusion GPU simulation with adjustable feed rate, kill rate, diffusion coefficients, and color palette for visual pattern generation.
Instructions
Build a Gray-Scott reaction-diffusion GPU simulation as a ready-to-use visual system. Delegates to the built-in 'reaction_diffusion' recipe (seed GLSL TOP → feedbackTOP → simulation GLSL TOP → null output), then overlays caller-provided Gray-Scott parameters (Feed rate F, Kill rate K, diffusion coefficients Da/Db) as GLSL uniforms, patches the shader so da/db use the uniforms instead of hard-coded constants, and optionally chains a rampTOP + lookupTOP for a color LUT (coral / spots / stripes / mitosis presets). Exposes a control panel with sliders for F, K, Da, Db, resolution, and a palette menu. Output node is a nullTOP ready for downstream wiring. 'iterations>1' is unverified — effective value is 1 with a warning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_path | No | Parent COMP path the reaction-diffusion container is created inside. | /project1 |
| name | No | Base name for the created container. | reaction_diffusion |
| F | No | Gray-Scott feed rate (uniform uFeed). Controls how fast chemical A is replenished. Lower = sparser, more open patterns; higher = denser maze-like structures. | |
| K | No | Gray-Scott kill rate (uniform uKill). Controls how fast chemical B is removed. Tune alongside F to shift between spots, stripes, and maze regimes. | |
| Da | No | Diffusion rate of chemical A (uniform uDa). Default 1.0. Increasing slows pattern growth; the recipe default is 1.0. | |
| Db | No | Diffusion rate of chemical B (uniform uDb). Default 0.5. Tuning relative to Da changes pattern sharpness. | |
| iterations | No | Simulation steps per rendered frame. UNVERIFIED — feedbackTOP has no native cookrate param; effective value is 1 with a warning if >1 is requested. Field retained for forward-compatibility. | |
| palette | No | Post-sim color LUT applied via a rampTOP + lookupTOP downstream of the GLSL simulation. 'coral' = deep-purple→magenta→cream→white; 'spots' = black→cyan→white; 'stripes' = indigo→green→yellow; 'mitosis' = blood-red→orange→bone-white; 'none' = raw simulation state (R=A, G=B). | coral |
| resolution | No | Square simulation grid size in pixels. Overrides seed1.resolutionw/h. Higher values produce finer detail at higher GPU cost. |