#!/bin/bash

WIDTH=512
HEIGHT=512
SEED=666
MESH=2048
DIMENSION=2.80
POWER=0.65

NOMBRE=96
DELAY=15	# for GIF animation

source functions_gif.bash

for i in $(seq 1 $NOMBRE)
do
	echo 
	dest=/tmp/planete$(printf "%03d" $i).ppm
	echo $dest
	
	hour=$i
	ice=$( echo "($i / $NOMBRE) + 0.001" | bc -l )
	echo ice = $ice
	ppmforge -hour $hour -seed $SEED -mesh $MESH	\
			-dimension $DIMENSION		\
			-power $POWER -ice $ice		\
			-width $WIDTH -height $HEIGHT > $dest

	annotate $i $dest
done

figlet -W planete.gif
convert -delay $DELAY /tmp/planete*.ppm planete.gif





