Fortraneries/Fraktalism/mkjuliagif.sh

34 lines
470 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
#
2023-01-01 14:28:52 +01:00
make mkjulia
2022-02-15 13:32:07 +01:00
if [ $? -ne 0 ] ; then
echo
echo "Make error " $?
exit 1
fi
#
# run the prog
#
2022-03-31 22:14:11 +02:00
for foo in $(seq 0 99)
2022-02-12 23:27:59 +01:00
do
2022-03-31 22:14:11 +02:00
img=$(printf "frames/julia/%05d.pgm" $foo)
2023-01-01 14:28:52 +01:00
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)
2022-02-12 23:27:59 +01:00
2023-01-01 14:28:52 +01:00
./mkjulia $img $cx $cy
2022-02-12 23:27:59 +01:00
done
echo ; echo "Encoding, please wait..."
2022-03-31 22:14:11 +02:00
convert -delay 10 frames/julia/*.pgm foo.gif
2023-01-01 14:28:52 +01:00
# animate foo.gif &
2022-02-12 23:27:59 +01:00