2022-12-03 12:25:37 +11:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2022-12-05 22:47:51 +11:00
|
|
|
POVOPT=" -q9 +a -W1024 -H768 +WT2 -d -v "
|
2022-12-03 12:25:37 +11:00
|
|
|
SOURCE="vision.pov"
|
|
|
|
TMPF="/dev/shm/gravfield.png"
|
|
|
|
|
2022-12-05 22:47:51 +11:00
|
|
|
date > pov.stderr
|
|
|
|
|
2022-12-03 12:25:37 +11:00
|
|
|
# ---------------------------------------
|
|
|
|
|
|
|
|
une_passe ()
|
|
|
|
{
|
|
|
|
clock=$1
|
|
|
|
|
2022-12-05 22:47:51 +11:00
|
|
|
cp pov.stderr old.stderr
|
|
|
|
|
2022-12-03 12:25:37 +11:00
|
|
|
povray -i${SOURCE} -K${clock} $POVOPT -O${TMPF} 2> pov.stderr
|
|
|
|
|
2022-12-04 06:42:29 +11:00
|
|
|
timestamp=$(date -u +'%F %H:%M' | tr '01' 'Ol')
|
|
|
|
texte=$(printf "pass %04d" $clock | tr '01' 'Ol')
|
|
|
|
outfile=$(printf "WS/troid/%05d.png" $clock)
|
|
|
|
echo $timestamp $texte $outfile
|
2022-12-03 12:25:37 +11:00
|
|
|
|
|
|
|
convert ${TMPF} \
|
2022-12-12 10:57:38 +11:00
|
|
|
-pointsize 22 \
|
2022-12-03 12:25:37 +11:00
|
|
|
-font Courier-Bold \
|
|
|
|
-fill Orange \
|
2022-12-12 10:57:38 +11:00
|
|
|
-annotate +15+22 "$timestamp" \
|
|
|
|
-annotate +15+48 "$texte" \
|
2022-12-05 22:47:51 +11:00
|
|
|
-pointsize 16 \
|
2022-12-04 06:42:29 +11:00
|
|
|
-gravity south-west \
|
2022-12-12 10:57:38 +11:00
|
|
|
-annotate +15+9 "tTh & Konrad" \
|
2022-12-03 12:25:37 +11:00
|
|
|
${outfile}
|
|
|
|
}
|
|
|
|
|
|
|
|
# ---------------------------------------
|
|
|
|
|
2022-12-16 01:03:37 +11:00
|
|
|
# main loop, build all that nice picz
|
|
|
|
|
2022-12-03 12:25:37 +11:00
|
|
|
for foo in $(seq 0 1999)
|
|
|
|
do
|
|
|
|
echo '............' $foo
|
|
|
|
une_passe $foo
|
|
|
|
done
|
|
|
|
|
|
|
|
ffmpeg -nostdin \
|
|
|
|
-loglevel warning \
|
2022-12-05 22:47:51 +11:00
|
|
|
-y -r 30 -f image2 -i WS/troid/%05d.png \
|
2022-12-04 06:42:29 +11:00
|
|
|
-metadata artist='---{ tTh and Konrad }---' \
|
2022-12-03 12:25:37 +11:00
|
|
|
-metadata title="Experiment on Gravity Field" \
|
|
|
|
-c:v libx264 -pix_fmt yuv420p \
|
|
|
|
bar.mp4
|
|
|
|
|