2022-02-07 09:45:08 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# how to run this mess in a batch style
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
INCFILE="bloubs.inc"
|
|
|
|
TMPPNG="/dev/shm/bloubs7.png"
|
2022-02-07 11:50:49 +11:00
|
|
|
POVOPT="+Q9 +a -v -d -W640 -H480"
|
2022-02-07 09:45:08 +11:00
|
|
|
DDIR="frames"
|
2022-02-07 11:50:49 +11:00
|
|
|
LOGERR="log.error"
|
2022-02-07 09:45:08 +11:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-02-07 11:50:49 +11:00
|
|
|
for idx in $(seq 0 50)
|
2022-02-07 09:45:08 +11:00
|
|
|
do
|
|
|
|
|
|
|
|
echo "======== run passe $idx ========="
|
|
|
|
|
|
|
|
./exportbloubs in.blbs | awk -f toinc.awk > $INCFILE
|
|
|
|
|
2022-02-07 11:50:49 +11:00
|
|
|
povray -Iscene.pov -K${idx} -O${TMPPNG} ${POVOPT} 2> $LOGERR
|
2022-02-07 09:45:08 +11:00
|
|
|
grep "Trace Tim" toto
|
|
|
|
|
|
|
|
txt=$(date +'%F %R:%S')
|
|
|
|
PNG=$(printf "%s/%05d.png" ${DDIR} $idx)
|
2022-02-07 11:50:49 +11:00
|
|
|
echo $txt
|
2022-02-07 09:45:08 +11:00
|
|
|
|
|
|
|
convert ${TMPPNG} \
|
|
|
|
-font fixed \
|
2022-02-07 11:50:49 +11:00
|
|
|
-pointsize 14 \
|
2022-02-07 09:45:08 +11:00
|
|
|
-fill orange \
|
|
|
|
-gravity south-east \
|
2022-02-07 11:50:49 +11:00
|
|
|
-annotate +15+10 "$txt" \
|
2022-02-07 09:45:08 +11:00
|
|
|
$PNG
|
|
|
|
|
2022-02-07 11:50:49 +11:00
|
|
|
echo $PNG '[done]'
|
2022-02-07 09:45:08 +11:00
|
|
|
|
2022-02-07 11:50:49 +11:00
|
|
|
./movebloubs in.blbs out.blbs
|
|
|
|
mv out.blbs in.blbs
|
|
|
|
echo
|
2022-02-07 09:45:08 +11:00
|
|
|
|
|
|
|
done
|
|
|
|
|
2022-02-07 11:50:49 +11:00
|
|
|
rm $LOGERR
|
2022-02-07 09:45:08 +11:00
|
|
|
|
2022-02-07 11:50:49 +11:00
|
|
|
convert -delay 10 -colors 192 $DDIR/*.png foo.gif
|
2022-02-07 09:45:08 +11:00
|
|
|
|
|
|
|
|