#! /bin/sh

scenepov=my_scene        #le nom du fichier sans l'extension .pov est attendu
debut=1
fin=1
large=320
haut=200

# --- chemins
pathpov=povray
pathinc=../include
pathinp=./
pathout=./images/

# --- options
library=+L$pathinc
inputfile=+I$pathinp$scenepov.pov
outputfile=+O$pathout$scenepov
largeur=+W$large
hauteur=+H$haut
antialiasing=+A3   #entre 0=max et 3=pas antialiasing (0.2 a 0.3)
rays=+R3
interruption=+X
statistiques=+V
format=+FT
clock=+K
display=+D

clear

i=$debut

while test $i -le $fin
do

    # --- commande
    outputfiles="$outputfile""_""$i.tga"
    commande1="$pathpov $library $inputfile"
    commande2="$outputfiles $largeur $hauteur"
    commande3="$antialiasing $rays $interruption"
    commande4="$statistiques $format $clock$i"
    commande5="$display"

    $commande1 $commande2 $commande3 $commande4 $commande5

    i=`expr $i + 1`   #pour speedy tapper i=`expr $i + 1`
		      #respecter les espace !
		      #il s'agit de backquotes !!!

		#pour bash taper i=$[$i+1]

done
