203 |
|
|
204 |
|
} # end of sub do_tree_bsdf() |
205 |
|
|
206 |
< |
# Run rcontrib process in background to generate tensor tree samples |
206 |
> |
# Run rcontrib process to generate tensor tree samples |
207 |
|
sub do_tree_rtcontrib { |
208 |
|
my $forw = shift; |
209 |
|
my $matargs = "-m $bmodnm"; |
210 |
< |
if ( !$forw || !$doback ) { $matargs .= " -m $fmodnm"; } |
210 |
> |
if ( !$forw || !$doback || $tensortree==3 ) { $matargs .= " -m $fmodnm"; } |
211 |
|
my $cmd = "rcontrib $rtargs -h -ff -fo -n $nproc -c $nsamp " . |
212 |
|
"-e '$disk2sq' -bn '$ns*$ns' " . |
213 |
|
"-b '$ns*floor(out_square_x*$ns)+floor(out_square_y*$ns)' " . |
254 |
|
my $forw = shift; |
255 |
|
my $side = ("Back","Front")[$forw]; |
256 |
|
my $cmd; |
257 |
< |
# Only output one transmitted distribution, preferring backwards |
258 |
< |
if ( !$forw || !$doback ) { |
257 |
> |
# Only output one transmitted anisotropic distribution, preferring backwards |
258 |
> |
if ( !$forw || !$doback || $tensortree==3 ) { |
259 |
|
print |
260 |
|
' <WavelengthData> |
261 |
|
<LayerNumber>System</LayerNumber> |
263 |
|
<SourceSpectrum>CIE Illuminant D65 1nm.ssp</SourceSpectrum> |
264 |
|
<DetectorSpectrum>ASTM E308 1931 Y.dsp</DetectorSpectrum> |
265 |
|
<WavelengthDataBlock> |
266 |
< |
<WavelengthDataDirection>Transmission</WavelengthDataDirection> |
267 |
< |
<AngleBasis>LBNL/Shirley-Chiu</AngleBasis> |
266 |
> |
'; |
267 |
> |
print "\t\t\t<WavelengthDataDirection>Transmission $side</WavelengthDataDirection>\n"; |
268 |
> |
print |
269 |
> |
' <AngleBasis>LBNL/Shirley-Chiu</AngleBasis> |
270 |
|
<ScatteringDataType>BTDF</ScatteringDataType> |
271 |
|
<ScatteringData> |
272 |
|
'; |