Fortraneries/Fraktalism/mkjuliagif.sh

39 lines
539 B
Bash
Raw Normal View History

2022-02-13 09:27:59 +11:00
#!/bin/bash
2022-02-15 23:32:07 +11:00
#
# build the prog
#
2023-01-02 00:28:52 +11:00
make mkjulia
2022-02-15 23:32:07 +11:00
if [ $? -ne 0 ] ; then
echo
echo "Make error " $?
exit 1
fi
#
# run the prog
#
2023-01-03 11:22:40 +11:00
workdir="frames/julia/"
for foo in $(seq 0 179)
2022-02-13 09:27:59 +11:00
do
2023-01-03 11:22:40 +11:00
img=$(printf "%s/%05d.pnm" $workdir $foo)
2023-01-02 00:28:52 +11:00
bar=$(echo "$foo / 247.0" | bc -l)
2023-01-03 11:22:40 +11: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-13 09:27:59 +11:00
2023-01-02 00:28:52 +11:00
./mkjulia $img $cx $cy
2022-02-13 09:27:59 +11:00
2023-05-07 19:35:48 +11:00
sleep 145
2022-02-13 09:27:59 +11:00
done
2023-01-03 11:22:40 +11:00
./tagpicz.sh $workdir
2022-02-13 09:27:59 +11:00
echo ; echo "Encoding, please wait..."
2023-01-03 11:22:40 +11:00
convert -delay 10 $workdir/*.pnm color-julia.gif
2023-01-02 00:28:52 +11:00
# animate foo.gif &
2022-02-13 09:27:59 +11:00