Fortraneries/Fraktalism/plotpick.sh

73 lines
1.0 KiB
Bash
Raw Normal View History

2022-02-16 00:18:35 +01:00
#!/bin/bash
ASCFILE="nuage.asc"
IMAGE="pick3d.png"
make pickover
if [ $? -ne 0 ] ; then
echo
echo "Make error " $?
exit 1
fi
./pickover foo.pgm > $ASCFILE
if [ $? -ne 0 ] ; then
echo
echo "Pickover error " $?
exit 1
fi
2022-02-16 12:15:30 +01:00
# ----------------------------------------------------
function plot_this_pic()
{
local imgname="$1"
local angle="$2"
printf "== %s == %3d ==\n" $imgname $angle
2022-02-16 00:18:35 +01:00
gnuplot << __EOC__
2022-02-16 12:15:30 +01:00
set term png size 800,480
set output "${imgname}"
2022-02-16 00:18:35 +01:00
2022-02-16 12:15:30 +01:00
set title "3D Pickover"
unset grid
unset tics
2022-02-16 00:18:35 +01:00
2022-02-16 12:15:30 +01:00
set view 70, $angle, 1.20
set xrange [ -2.10 : 2.10 ]
set yrange [ -2.10 : 2.10 ]
set zrange [ -1.00 : 1.00 ]
2022-02-16 00:18:35 +01:00
2022-02-16 12:15:30 +01:00
splot "${ASCFILE}" notitle with dots lt rgb "blue"
2022-02-16 00:18:35 +01:00
__EOC__
2022-02-16 12:15:30 +01:00
}
# ----------------------------------------------------
ddir="frames"
rm $ddir/p???.png
idx=0
for angle in $(seq 0 6 360)
do
fname=$(printf "%s/p%03d.png" $ddir $idx)
plot_this_pic $fname $angle
idx=$(( idx + 1 ))
done
convert -delay 10 $ddir/p???.png pickover.gif
echo '[done]'
# ------------------------------------------ EOJ -----
2022-02-16 00:18:35 +01:00