amenui
en·中 github ↗ v0.0.1
01docs 02components 03lab 04works
en·中github ↗
×

docs / lab / grown to shape docs / lab /

Grown to shape

On this page ▾
  1. Formula
  2. Parameters
  3. How it is made
drawn by amenuiopen ↗

Gray–Scott reaction–diffusion confined to a real outline. The shape is an ordinary element, laid out and hidden; El::on_outline sends its true coverage as a mask, and the maze pattern grows inside it and stops at its edge. Two letters, a toggle control and a rounded square take turns by themselves every T seconds; each change decodes the old pattern away and the new shape in (El::decode), and every dot is sized by how much v is there.

Formula

text
u′ = Du∇²u − uv² + f(1 − u),  v′ = Dv∇²v + uv² − (f + k)v,  Du = 1, Dv = 0.5

Parameters

Every number is a number control under the cell (type, arrow keys, drag sideways); none is a slider.

namedefaultrangewhat it is
f0.0290.01–0.08feed
k0.0570.04–0.07kill
steps24 /frame1–40steps per frame
T7 s2–30time per shape

How it is made

field::GrayScott (masked: outside it u = 1, v = 0); dragging seeds v. The code is examples/lab/grown.rs.