#! /bin/csh set usage = "$0 {AON|AOFF} FILE.inc" 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} \ | gawk \ ' { \ gsub(/>, 0[.]02/, ">, 0.03", $0); \ gsub(/>, 0[.]004/, ">, 0.004", $0); \ gsub(/^ 0[.]004/, " 0.004", $0); \ gsub(/>, 0[.]0025/, ">, 0.0035", $0); \ gsub(/^ 0[.]0025/, " 0.0035", $0); \ } \ // { print; } \ ' \ >> ${edfile} cat <> ${edfile} } EOF set apov = /usr/local/pkg/povray-3.1a-1/PUB/alpha-OSF1-V4.0 set bpov = ${STOLFIHOME}/pkg/povray-3.1a-1/PUB/${PLATFORM} if ( -d ${apov} ) then set povpub = ${apov} else if ( -d ${bpov} ) then set povpub = ${bpov} else echo "povray not found"; exit 1 endif if ( -x ${povpub}/bin/x-povray ) then set povray = ${povpub}/bin/x-povray else set povray = ${povpub}/bin/povray endif set povinc = ${povpub}/povinc/ echo 'rendering ${infile}...' echo 'rendering ${infile}...' if ("${smooth}" == "AON") then ${povray} +I${edfile} +FP +W400 +H400 +A0 +R3 +D -L${povinc} -V; else if ("${smooth}" == "AOFF") then ${povray} +I${edfile} +FP +W200 +H200 +D -L${povinc}; endif echo "finished ${infile}"