ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/genBSDF.pl
(Generate patch)

Comparing ray/src/util/genBSDF.pl (file contents):
Revision 2.16 by greg, Tue May 31 20:50:26 2011 UTC vs.
Revision 2.20 by greg, Sat Jun 4 00:33:53 2011 UTC

# Line 13 | Line 13 | sub userror {
13   }
14   my $td = mkdtemp("/tmp/genBSDF.XXXXXX");
15   chomp $td;
16 + my @savedARGV = @ARGV;
17   my $tensortree = 0;
18   my $ttlog2 = 4;
19   my $nsamp = 1000;
# Line 98 | Line 99 | die "Could not compile scene\n" if ( $? );
99   print
100   '<?xml version="1.0" encoding="UTF-8"?>
101   <WindowElement xmlns="http://windows.lbl.gov" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://windows.lbl.gov/BSDF-v1.4.xsd">
102 < <WindowElementType>System</WindowElementType>
102 > ';
103 > print "<!-- File produced by: genBSDF @savedARGV -->\n";
104 > print
105 > '<WindowElementType>System</WindowElementType>
106   <Optical>
107   <Layer>
108          <Material>
# Line 248 | Line 252 | sub bg_tree_rtcontrib {
252                          "| rcalc -e 'r1=rand(($pn+.8681)*recno-.673892)' " .
253                          "-e 'r2=rand(($pn-5.37138)*recno+67.1737811)' " .
254                          "-e 'r3=rand(($pn+3.17603772)*recno+83.766771)' " .
255 <                        "-e 'Dx=1-($pbeg+\$1+r1)/$ns;Dy:0;Dz=sqrt(1-Dx*Dx)' " .
255 >                        "-e 'Dx=1-2*($pbeg+\$1+r1)/$ns;Dy:0;Dz=sqrt(1-Dx*Dx)' " .
256                          "-e 'xp=(\$3+r2)*(($dim[1]-$dim[0])/$nx)+$dim[0]' " .
257                          "-e 'yp=(\$2+r3)*(($dim[3]-$dim[2])/$ny)+$dim[2]' " .
258                          "-e 'zp=$dim[5-$forw]' -e 'myDz=Dz*($forw*2-1)' " .
# Line 315 | Line 319 | print
319                  <SourceSpectrum>CIE Illuminant D65 1nm.ssp</SourceSpectrum>
320                  <DetectorSpectrum>ASTM E308 1931 Y.dsp</DetectorSpectrum>
321                  <WavelengthDataBlock>
322 <                        <WavelengthDataDirection>Reflection $side</WavelengthDataDirection>
323 <                        <AngleBasis>LBNL/Shirley-Chiu</AngleBasis>
322 > ';
323 > print "\t\t\t<WavelengthDataDirection>Reflection $side</WavelengthDataDirection>\n";
324 > print
325 > '                       <AngleBasis>LBNL/Shirley-Chiu</AngleBasis>
326                          <ScatteringDataType>BRDF</ScatteringDataType>
327                          <ScatteringData>
328   ';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines