#!/bin/bash
##########################################################################
##
## rendAR! the artist barbarian sez "rendAR [filename]".
## Takes files from whereever, and puts them in ./image.
##########################################################################
for INFILE in $1*; do
	y=${INFILE}.qrt
	z=${y#out/}
	POVOUT=images/$z
	echo $1 to $x to $y to $z to $POVOUT
	povray -I$INFILE -O$POVOUT +L/usr/include/povray -w200 -h200 +v -a +q6 -j +b30
	echo -n Converting from qrt to gif...
	y=${POVOUT%%qrt}
	OUTFILE=${y}gif
	qrttoppm $POVOUT | ppmquant 250 | ppmtogif > $OUTFILE
	echo done.
	echo -n Removing old qrt file...
	rm -f $POVOUT
	echo done. Next image please...
done
