Switch to simpler initialization
This commit is contained in:
parent
87c866eaed
commit
c9215fdee9
4 changed files with 506 additions and 578 deletions
73
README.org
73
README.org
|
@ -2,75 +2,4 @@
|
||||||
|
|
||||||
Reaction-Diffusion system simulation using the Gray-Scott model, in [[https://www.dyalog.com/][Dyalog APL]].
|
Reaction-Diffusion system simulation using the Gray-Scott model, in [[https://www.dyalog.com/][Dyalog APL]].
|
||||||
|
|
||||||
#+begin_src
|
[[img.png]]
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺ ⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺ ⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺ ⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺ ⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺ ⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺ ⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺⌺
|
|
||||||
#+end_src
|
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
⍝ Parameters
|
⍝ Parameters
|
||||||
dt da db f k←1.0 0.16 0.08 0.060 0.062
|
dt da db f k←1.0 0.16 0.08 0.060 0.062
|
||||||
⍝ Initialization
|
⍝ Initialization
|
||||||
N←200
|
N←500
|
||||||
A←0.8+0.2×?N N⍴0
|
A←N N⍴1
|
||||||
A[((N÷2)-10)+⍳20;((N÷2)-10)+⍳20]←0.5
|
B←0.1×?N N⍴0
|
||||||
B←0.2×?N N⍴0
|
B[((N÷2)-10)+⍳20;((N÷2)-10)+⍳20]←1
|
||||||
B[((N÷2)-10)+⍳20;((N÷2)-10)+⍳20]←0.25
|
|
||||||
⍝ Run
|
⍝ Run
|
||||||
steps←10000
|
steps←20000
|
||||||
Ap Bp←(update⍣steps)A B
|
Ap Bp←(update⍣steps)A B
|
||||||
⍝ ' ⌺'[Ap>0.5]
|
⍝ ' ⌺'[Ap>0.5]
|
||||||
⍝ Export to image file
|
⍝ Export to image file
|
||||||
|
|
BIN
img.png
BIN
img.png
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue