Fortraneries/Fraktalism/mkjuliagif.sh

33 lines
425 B
Bash
Executable File

#!/bin/bash
#
# build the prog
#
make julia
if [ $? -ne 0 ] ; then
echo
echo "Make error " $?
exit 1
fi
#
# run the prog
#
for foo in $(seq 0 39)
do
img=$(printf "frames/%05d.pgm" $foo)
bar=$(echo "$foo / 247.0" | bc -l)
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