--- ray/src/util/genBSDF.pl 2010/12/09 17:00:43 2.5 +++ ray/src/util/genBSDF.pl 2011/01/27 22:28:12 2.7 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genBSDF.pl,v 2.5 2010/12/09 17:00:43 greg Exp $ +# RCSid $Id: genBSDF.pl,v 2.7 2011/01/27 22:28:12 greg Exp $ # # Compute BSDF based on geometry and material description # @@ -54,8 +54,7 @@ if ( $mgfin ) { system "rad2mgf $radscn > $mgfscn" if ( $geout ); } if ($#dim != 5) { - @dim = split /\s+/, `getbbox -h $radscn`; - shift @dim; + @dim = split ' ', `getbbox -h $radscn`; } print STDERR "Warning: Device extends into room\n" if ($dim[5] > 1e-5); # Add receiver surface (rectangle) @@ -132,7 +131,7 @@ my $cmd = "cnt $ndiv $ny $nx | rcalc -of -e '$tcal' " "| rtcontrib -h -ff -n $nproc -c $nsamp -e '$kcal' -b kbin -bn $ndiv " . "-m $modnm -w -ab 5 -ad 700 -lw 3e-6 $octree " . "| rcalc -e '$tcal' " . - "-e 'mod(n,d):n-floor(n/d)*d' -e 'Kbin=mod(recno-1,$ndiv)' " . + "-e 'mod(n,d):n-floor(n/d)*d' -e 'Kbin=mod(recno-.999,$ndiv)' " . q{-if3 -e '$1=(0.265*$1+0.670*$2+0.065*$3)/KprojOmega'}; my @darr = `$cmd`; die "Failure running: $cmd\n" if ( $? );