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

Comparing ray/src/px/falsecolor.csh (file contents):
Revision 2.14 by greg, Fri Nov 18 22:17:16 2005 UTC vs.
Revision 2.17 by greg, Wed Nov 15 08:17:13 2006 UTC

# Line 11 | Line 11 | set mult=179
11   set label=Nits
12   set scale=1000
13   set decades=0
14 # set redv='1.6*v-.6'
15 # set grnv='if(v-.375,1.6-1.6*v,8/3*v)'
16 # set bluv='1-8/3*v'
14   set redv='def_red(v)'
15   set grnv='def_grn(v)'
16   set bluv='def_blu(v)'
# Line 40 | Line 37 | while ($#argv > 0)
37          case -s:
38                  shift argv
39                  set scale="$argv[1]"
40 +                if ("$scale" =~ [aA]*) set needfile
41                  breaksw
42          case -l:
43                  shift argv
# Line 61 | Line 59 | while ($#argv > 0)
59                  shift argv
60                  set bluv="$argv[1]"
61                  breaksw
62 +        case -spec:
63 +                set redv='1.6*v-.6'
64 +                set grnv='if(v-.375,1.6-1.6*v,8/3*v)'
65 +                set bluv='1-8/3*v'
66 +                breaksw
67          case -i:
68                  shift argv
69                  set picture="$argv[1]"
# Line 98 | Line 101 | while ($#argv > 0)
101          shift argv
102   end
103   mkdir $td
104 + if ($?needfile && "$picture" == '-') then
105 +        cat > $td/picture
106 +        set picture=$td/picture
107 + endif
108 + if ("$scale" =~ [aA]*) then
109 +        set LogLmax=`phisto $picture | tail -2 | sed -n '1s/    [0-9]*$//p'`
110 +        set scale=`ev "$mult/179*10^$LogLmax"`
111 + endif
112   cat > $td/pc0.cal <<_EOF_
113   PI : 3.14159265358979323846 ;
114   scale : $scale ;
# Line 115 | Line 126 | boundary(a,b) : neq(floor(ndivs*a+.5),floor(ndivs*b+.5
126   interp_arr2(i,x,f):(i+1-x)*f(i)+(x-i)*f(i+1);
127   interp_arr(x,f):if(x-1,if(f(0)-x,interp_arr2(floor(x),x,f),f(f(0))),f(1));
128   def_redp(i):select(i,0.18848,0.05468174,
129 < 0.00103547,8.311144e-08,7.449763e-06,0.0004390987,0.001389302,
130 < 0.003306035,0.01381413,0.0563861,0.1534137,0.2581243,0.3059902,
131 < 0.3449827,0.3791056,0.4138921,0.4678283,0.624231,0.7732902,
132 < 0.9067587,1,1,0.9863);
129 > 0.00103547,8.311144e-08,7.449763e-06,0.0004390987,0.001367254,
130 > 0.003076,0.01376382,0.06170773,0.1739422,0.2881156,0.3299725,
131 > 0.3552663,0.372552,0.3921184,0.4363976,0.6102754,0.7757267,
132 > 0.9087369,1,1,0.9863);
133   def_red(x):interp_arr(x/0.0454545+1,def_redp);
134   def_grnp(i):select(i,0.0009766,2.35501e-05,
135 < 0.0008966244,0.0264977,0.1256843,0.2865799,0.424867,0.4750973,
136 < 0.4403898,0.3568169,0.244569,0.1643434,0.1297663,0.1001566,
137 < 0.07522873,0.05465921,0.03394894,0.001412969,0.00681687,
138 < 0.0974651,0.3106831,0.6447838,0.9707);
135 > 0.0008966244,0.0264977,0.1256843,0.2865799,0.4247083,0.4739468,
136 > 0.4402732,0.3671876,0.2629843,0.1725325,0.1206819,0.07316644,
137 > 0.03761026,0.01612362,0.004773749,6.830967e-06,0.00803605,
138 > 0.1008085,0.3106831,0.6447838,0.9707);
139   def_grn(x):interp_arr(x/0.0454545+1,def_grnp);
140   def_blup(i):select(i,0.2666,0.3638662,0.4770437,
141 < 0.5131397,0.5363797,0.5193677,0.4091852,0.1732726,0.05331749,
142 < 0.04184916,0.05768565,0.070331,0.0738812,0.07805368,0.08024318,
143 < 0.07775604,0.06449649,0.01028498,0.0003090336,0.0004275006,
144 < 0.002297005,0.01128842,0.02539);
141 > 0.5131397,0.5363797,0.5193677,0.4085123,0.1702815,0.05314236,
142 > 0.05194055,0.08564082,0.09881395,0.08324373,0.06072902,
143 > 0.0391076,0.02315354,0.01284458,0.005184709,0.001691774,
144 > 2.432735e-05,1.212949e-05,0.006659406,0.02539);
145   def_blu(x):interp_arr(x/0.0454545+1,def_blup);
146  
147   isconta = if(btwn(0,v,1),or(boundary(vleft,vright),boundary(vabove,vbelow)),-1);
# Line 171 | Line 182 | if ("$cpict" == "") then
182          set pc1args=($pc1args -e 'ra=0;ga=0;ba=0')
183   else if ("$cpict" == "$picture") then
184          set cpict=
174 endif
175 if ($?needfile && "$picture" == '-') then
176        cat > $td/picture
177        set picture=$td/picture
185   endif
186   if ("$decades" != "0") then
187          set pc1args=($pc1args -e "map(x)=if(x-10^-$decades,log10(x)/$decades+1,0)")

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines