Fortraneries/Fraktalism/mkjuliagif.sh

33 lines
425 B
Bash
Raw Normal View History

2022-02-12 23:27:59 +01:00
#!/bin/bash
2022-02-15 13:32:07 +01:00
#
# build the prog
#
make julia
if [ $? -ne 0 ] ; then
echo
echo "Make error " $?
exit 1
fi
#
# run the prog
#
2022-02-12 23:27:59 +01:00
for foo in $(seq 0 39)
do
img=$(printf "frames/%05d.pgm" $foo)
2022-02-15 13:32:07 +01:00
bar=$(echo "$foo / 247.0" | bc -l)
2022-02-12 23:27:59 +01:00
cx=$(echo "0.4 * c($foo)" | bc -l)
cy=$(echo "0.4 * s($foo*2)" | bc -l)
./julia $img $cx $cy
done
echo ; echo "Encoding, please wait..."
convert -delay 10 frames/*.pgm foo.gif