Add reaction-diffusion in BQN, with video generation script

This commit is contained in:
Dimitri Lozeve 2023-10-03 13:38:33 +02:00
parent 2dd11ef413
commit c607954d34
5 changed files with 45 additions and 0 deletions

11
generate_animation.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
mkdir -p out
bqn grayscott.bqn
# first image is often bad
rm out/step00000.pnm
# convert all to PNG
parallel --jobs 8 "pnmtopng {} > {.}.png" ::: out/*.pnm
# generate video
ffmpeg -y -framerate 30 -pattern_type glob -i 'out/*.png' -r 30 -vf scale=500:-1 -loop 0 out.mp4