Fortraneries/Fraktalism/mkjuliagif.sh

39 lines
539 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
#
2023-01-03 01:22:40 +01:00
workdir="frames/julia/"
for foo in $(seq 0 179)
2022-02-12 23:27:59 +01:00
do
2023-01-03 01:22:40 +01:00
img=$(printf "%s/%05d.pnm" $workdir $foo)
2023-01-01 14:28:52 +01:00
bar=$(echo "$foo / 247.0" | bc -l)
2023-01-03 01:22:40 +01:00
cx=$(echo "0.5 * (1.52*c($foo/28.0))" | bc -l)
cy=$(echo "0.5 * (1.45*s($foo/17.0))" | 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
2023-05-07 10:35:48 +02:00
sleep 145
2022-02-12 23:27:59 +01:00
done
2023-01-03 01:22:40 +01:00
./tagpicz.sh $workdir
2022-02-12 23:27:59 +01:00
echo ; echo "Encoding, please wait..."
2023-01-03 01:22:40 +01:00
convert -delay 10 $workdir/*.pnm color-julia.gif
2023-01-01 14:28:52 +01:00
# animate foo.gif &
2022-02-12 23:27:59 +01:00