ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/optics2rad.csh
(Generate patch)

Comparing ray/src/cv/optics2rad.csh (file contents):
Revision 2.2 by greg, Fri May 19 21:33:12 2006 UTC vs.
Revision 2.3 by greg, Mon Aug 25 04:50:31 2008 UTC

# Line 7 | Line 7 | if ($#argv < 1) then
7          echo "Usage: $0 optics.mat .."
8          exit 1
9   endif
10 < cat > /tmp/opt.fmt << '_EOF_'
10 > set optf=`mktemp /tmp/optfmt.XXXXXXX`
11 > cat > $optf << '_EOF_'
12   void glass $(name)_glass
13   0
14   0
# Line 35 | Line 36 | void BRTDfunc $(name)_back
36   echo "# Output generated by $0 from $*"
37   sed -e '/^[^#]/d' -e '/^$/d' $*
38  
39 < cat > /tmp/out$$.fmt << '_EOF_'
39 > set outf=`mktemp /tmp/outfmt.XXXXXX`
40 > cat > $outf << '_EOF_'
41  
42   void glass $(name)
43   0
# Line 48 | Line 50 | rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(
50          -e 'trans=lum(Rtau,Gtau,Btau)' \
51          -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \
52          -e 'cond=0.005-abs(rfront-rback)' \
53 <        -i /tmp/opt.fmt -o /tmp/out$$.fmt $*
53 >        -i $optf -o $outf $*
54  
55 < cat > /tmp/out$$.fmt << '_EOF_'
55 > cat > $outf << '_EOF_'
56  
57   void BRTDfunc $(name)
58   10
# Line 69 | Line 71 | rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(
71          -e 'trans=lum(Rtau,Gtau,Btau)' \
72          -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \
73          -e 'cond=and(trans-.645, not(0.005-abs(rfront-rback)))' \
74 <        -i /tmp/opt.fmt -o /tmp/out$$.fmt $*
74 >        -i $optf -o $outf $*
75  
76 < cat > /tmp/out$$.fmt << '_EOF_'
76 > cat > $outf << '_EOF_'
77  
78   void BRTDfunc $(name)
79   10
# Line 90 | Line 92 | rcalc -l -e 'abs(x):if(x,x,-x);and(a,b):if(a,b,a);not(
92          -e 'trans=lum(Rtau,Gtau,Btau)' \
93          -e 'rfront=lum(fRrho,fGrho,fBrho);rback=lum(bRrho,bGrho,bBrho)' \
94          -e 'cond=and(not(trans-.645), not(0.005-abs(rfront-rback)))' \
95 <        -i /tmp/opt.fmt -o /tmp/out$$.fmt $*
95 >        -i $optf -o $outf $*
96  
97 < rm -f /tmp/opt.fmt /tmp/out$$.fmt
97 > rm -f $optf $outf

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines