Fortraneries/Fraktalism/mkjuliagif.sh

34 lines
470 B
Bash
Executable File

#!/bin/bash
#
# build the prog
#
make mkjulia
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.7 * (2.72*c($foo/3))" | bc -l)
cy=$(echo "0.5 * (1.45+s($foo/2))" | bc -l)
./mkjulia $img $cx $cy
done
echo ; echo "Encoding, please wait..."
convert -delay 10 frames/julia/*.pgm foo.gif
# animate foo.gif &