Fortraneries/Fraktalism/mkjuliagif.sh

34 lines
457 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 99)
do
img=$(printf "frames/julia/%05d.pgm" $foo)
bar=$(echo "$foo / 247.0" | bc -l)
cx=$(echo "0.3 * c($foo/3)" | bc -l)
cy=$(echo "0.3 * s($foo/2)" | bc -l)
./julia $img $cx $cy
done
echo ; echo "Encoding, please wait..."
convert -delay 10 frames/julia/*.pgm foo.gif
animate foo.gif &