2022-02-13 09:27:59 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-02-15 23:32:07 +11:00
|
|
|
#
|
|
|
|
# build the prog
|
|
|
|
#
|
|
|
|
|
|
|
|
make julia
|
|
|
|
if [ $? -ne 0 ] ; then
|
|
|
|
echo
|
|
|
|
echo "Make error " $?
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# run the prog
|
|
|
|
#
|
2022-02-13 09:27:59 +11:00
|
|
|
for foo in $(seq 0 39)
|
|
|
|
do
|
|
|
|
|
|
|
|
img=$(printf "frames/%05d.pgm" $foo)
|
2022-02-15 23:32:07 +11:00
|
|
|
bar=$(echo "$foo / 247.0" | bc -l)
|
2022-02-13 09:27:59 +11:00
|
|
|
cx=$(echo "0.4 * c($foo)" | bc -l)
|
|
|
|
cy=$(echo "0.4 * s($foo*2)" | bc -l)
|
|
|
|
|
|
|
|
./julia $img $cx $cy
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
echo ; echo "Encoding, please wait..."
|
|
|
|
|
|
|
|
convert -delay 10 frames/*.pgm foo.gif
|
|
|
|
|