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; |
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> |
321 |
|
<WavelengthDataBlock> |
322 |
|
'; |
323 |
|
print "\t\t\t<WavelengthDataDirection>Reflection $side</WavelengthDataDirection>\n"; |
324 |
< |
print ' <AngleBasis>LBNL/Shirley-Chiu</AngleBasis> |
324 |
> |
print |
325 |
> |
' <AngleBasis>LBNL/Shirley-Chiu</AngleBasis> |
326 |
|
<ScatteringDataType>BRDF</ScatteringDataType> |
327 |
|
<ScatteringData> |
328 |
|
'; |
402 |
|
"-o '$td/%s.flt' -m $fmodnm -m $bmodnm $octree"; |
403 |
|
my $rccmd = "rcalc -e '$tcal' " . |
404 |
|
"-e 'mod(n,d):n-floor(n/d)*d' -e 'Kbin=mod(recno-.999,$ndiv)' " . |
405 |
< |
q{-if3 -e '$1=(0.265*$1+0.670*$2+0.065*$3)/KprojOmega'}; |
405 |
> |
q{-if3 -e 'oval=(0.265*$1+0.670*$2+0.065*$3)/KprojOmega' } . |
406 |
> |
q[-o '${ oval },']; |
407 |
|
if ( $doforw ) { |
408 |
|
$cmd = "cnt $ndiv $ny $nx | rcalc -of -e '$tcal' " . |
409 |
|
"-e 'xp=(\$3+rand(.12*recno+288))*(($dim[1]-$dim[0])/$nx)+$dim[0]' " . |