Fortraneries/BloubWorld/runme.sh

59 lines
951 B
Bash
Executable File

#!/bin/bash
#
# how to run this mess in a batch style
#
INCFILE="bloubs.inc"
TMPPNG="/dev/shm/bloubs7.png"
POVOPT="+Q9 -v -d -W640 -H480"
DDIR="frames"
make all
err=$?
if [ $err -ne 0 ] ; then
echo 'make error = ' $err
exit 1
fi
#
# first, we have to make a seminal buch of bloubs
# --> this function need to be paraletrizable
#
./genbloubs in.blbs 10000
for idx in $(seq 0 40)
do
echo "======== run passe $idx ========="
./exportbloubs in.blbs | awk -f toinc.awk > $INCFILE
povray -Iscene.pov -K${idx} -O${TMPPNG} ${POVOPT} 2> toto
grep "Trace Tim" toto
txt=$(date +'%F %R:%S')
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
echo $PNG $txt
convert ${TMPPNG} \
-font fixed \
-pointsize 12 \
-fill orange \
-gravity south-east \
-annotate +10+10 "$txt" \
$PNG
./movebloubs in.blbs out.blbs
cp out.blbs in.blbs
sleep 2 ; echo
done
rm toto
convert -delay 10 -colors 32 $DDIR/*.png foo.gif