23 lines
384 B
Bash
23 lines
384 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
if [ $# -ne 1 ]; then
|
||
|
echo "You must pass the basename for the slices"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
echo "Building"
|
||
|
go build -o render
|
||
|
mkdir -p $1
|
||
|
|
||
|
frame=0
|
||
|
for x in $(seq -0.7 0.05 0.7); do
|
||
|
ff=$(printf "%03d" $frame)
|
||
|
./render "-p6file=$1/$ff.ppm" "-zcuthigh=$x"
|
||
|
frame=$((frame + 1))
|
||
|
done
|
||
|
|
||
|
echo "Converting animation"
|
||
|
|
||
|
cd $1
|
||
|
convert -delay 10 -loop 0 *.ppm -resize 256x256 anim.gif
|