{"id":20041972,"url":"https://github.com/dlozeve/reaction-diffusion","last_synced_at":"2026-03-19T13:13:29.156Z","repository":{"id":155391522,"uuid":"319409845","full_name":"dlozeve/reaction-diffusion","owner":"dlozeve","description":"Reaction-Diffusion system simulation in Dyalog APL and BQN","archived":false,"fork":false,"pushed_at":"2023-10-03T20:51:52.000Z","size":952,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-16T07:12:42.939Z","etag":null,"topics":["bqn","dyalog-apl","gray-scott","netpbm","reaction-diffusion"],"latest_commit_sha":null,"homepage":"","language":"APL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlozeve.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-07T18:33:01.000Z","updated_at":"2025-02-02T02:39:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba70b8e7-10a8-480f-a50a-d2c7bf3aae92","html_url":"https://github.com/dlozeve/reaction-diffusion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dlozeve/reaction-diffusion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlozeve%2Freaction-diffusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlozeve%2Freaction-diffusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlozeve%2Freaction-diffusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlozeve%2Freaction-diffusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlozeve","download_url":"https://codeload.github.com/dlozeve/reaction-diffusion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlozeve%2Freaction-diffusion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29201102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T16:28:23.579Z","status":"ssl_error","status_checked_at":"2026-02-07T16:28:22.566Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bqn","dyalog-apl","gray-scott","netpbm","reaction-diffusion"],"created_at":"2024-11-13T10:48:24.966Z","updated_at":"2026-02-07T17:31:44.952Z","avatar_url":"https://github.com/dlozeve.png","language":"APL","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Reaction-Diffusion Model\n\n[[https://en.wikipedia.org/wiki/Reaction%E2%80%93diffusion_system][Reaction-Diffusion system]] simulation using the Gray-Scott model, in [[https://www.dyalog.com/][Dyalog APL]] and [[https://mlochbaum.github.io/BQN/index.html][BQN]].\n\n[[img.png]]\n\n** Running the Dyalog version\n\n[[https://www.dyalog.com/download-zone.htm][Install Dyalog APL]] and [[https://en.wikipedia.org/wiki/Netpbm][Netpbm]] (~apt-get install netpbm~). Then run\n~make~. This will create the =img.pnm= and =img.png= files in the\ncurrent directory.\n\nThe images are generated from APL by creating a [[https://en.wikipedia.org/wiki/Netpbm][Netpbm]] file, which are\nnice because they are just plain-text. It is then converted to PNG\nusing ~pnmtopng~.\n\n** Running the BQN version\n\nClone [[https://github.com/dlozeve/bqn-graphics][bqn-graphics]] at the same level than this repository. Run the\n=./generate_animation.sh= script. It requires [[https://www.gnu.org/software/parallel/][GNU Parallel]], [[https://en.wikipedia.org/wiki/Netpbm][Netpbm]],\nand ffmpeg.\n\nPNM and PNG images are in the =out= directory, and the animation is in\n=out.mp4=.\n\n** Parameters\n\nAll the parameters are defined directly in [[grayscott.dyalog]].\n\nThe parameters of the model are:\n- ~dt~: the time step,\n- ~da~: the diffusion rate for A,\n- ~db~: the diffusion rate for B,\n- ~f~: the feed rate for A,\n- ~k~: the kill rate for B.\n\nAdditionally, you can change ~N~, the size of the grid, and ~steps~,\nthe number of time steps to simulate.\n\nFinally, the function ~mat2pbm~ exports to a bitmap (black and white)\nformat, while ~mat2pgm~ exports a grayscale image.\n\n** References\n\n[[http://www.karlsims.com/rd.html][This page]] gives a good explanation of the Gray-Scott model. [[https://github.com/EnvModelling/Env_modelling/blob/master/Spatio-temporal-modelling/Reaction_diffusion_2D.ipynb][This\nnotebook]] gives a nice example of implementation in Python with\nNumpy. For even more details on the model and a classification of\npattern, see [[http://mrob.com/pub/comp/xmorphia/][this page]].\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlozeve%2Freaction-diffusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlozeve%2Freaction-diffusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlozeve%2Freaction-diffusion/lists"}