#! /bin/csh -f # Last edited on 2008-02-04 20:21:22 by stolfi set usage = "$0 NAME WIDTH HEIGHT MAGNIFY [AON|AOFF]" if ( $#argv != 5) then echo "usage: $usage"; exit 1 endif set name = $1; shift; set width = $1; shift; set height = $1; shift; set magnify = "$1"; shift; set smooth = $1; shift set bindir = "$0"; set bindir = "${bindir:h}" set povpub = ${STOLFIHOME}/pkg/povray-3.1a-1/PUB/${PLATFORM} set povray = ${povpub}/bin/x-povray set povinc = ${povpub}/povinc/ echo ${name} if ( -r ${name}.pov ) then echo "using the existing ${name}.pov" else if ( -r model.pov ) then echo "using the local copy of model.pov" cat model.pov > ${name}.pov else if ( -r ${bindir}/model.pov ) then echo "using ${bindir}/model.pov" cat ${bindir}/model.pov > ${name}.pov endif /bin/rm -f params.inc echo '#include "'"${name}"'.inc"' >> params.inc; echo '#declare wd = '"${width}"';' >> params.inc; echo '#declare ht = '"${height}"';' >> params.inc; echo '#declare magnify = '"${magnify}"';' >> params.inc; if ("${smooth}" == "AON") then ${povray} +I${name}.pov +FN +W${width} +H${height} +A0 +R3 +D +L${povinc} -V; else if ("${smooth}" == "AOFF") then ${povray} +I${name}.pov +FN +W${width} +H${height} +A0 +R3 +D +L${povinc}; else if ("${smooth}" == "ANIM") then ${povray} /home/phd/lplozada/bin/animation.ini +I${name}.pov +FN +W${width} +H${height} +A0 +R3 +D +L${povinc}; endif display ${name}.png& echo "finish" exit 0