#! /bin/csh set usage = "$0 {AON|AOFF} FILE" if ( $#argv != 2) then echo "usage: $usage"; exit 1 endif set smooth = "$1"; shift set infile = "$1"; shift echo ${infile} set outname = ${infile:r} set edfile = "${outname}.pov" /bin/rm -f ${edfile} cat <> ${edfile} #include "inc-to-pov-header.inc" union{ EOF cat ${infile}.inc \ | gawk \ ' { \ gsub(/>, 0[.]02/, ">, 0.03", $0); \ gsub(/>, 0[.]015/, ">, 0.035", $0); \ gsub(/^ 0[.]004/, " 0.015", $0); \ gsub(/>, 0[.]0025/, ">, 0.004", $0); \ gsub(/^ 0[.]0025/, " 0.004", $0); \ } \ // { print; } \ ' \ >> ${edfile} cat <> ${edfile} rotate <0,0,120> } EOF set povpub = ${STOLFIHOME}/pkg/povray-3.1a-1/PUB/${PLATFORM} set povray = ${povpub}/bin/x-povray set povinc = ${povpub}/povinc/ echo ${infile} if ( ! ( -r ${infile}.pov ) ) then cat ${STOLFIHOME}/bin/model.pov \ > ${infile}.pov endif echo 'rendering ${infile}...' if ("${smooth}" == "AON") then ${povray} +I${edfile} +FP +W640 +H480 +A0 +R3 +D -L${povinc} -V; else if ("${smooth}" == "AOFF") then ${povray} +I${edfile} +FP +W320 +H240 +D -L${povinc}; endif echo "finished ${infile}" ~/bin/xv ${infile}.ppm&