--- ray/src/util/genBSDF.pl 2013/04/23 23:22:09 2.42 +++ ray/src/util/genBSDF.pl 2013/09/07 17:56:02 2.44 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genBSDF.pl,v 2.42 2013/04/23 23:22:09 greg Exp $ +# RCSid $Id: genBSDF.pl,v 2.44 2013/09/07 17:56:02 greg Exp $ # # Compute BSDF based on geometry and material description # @@ -181,7 +181,7 @@ $disk2sq = ' norm_radians(p) : if(-p - PI/4, p + 2*PI, p); in_disk_r = .999995*sqrt(Dx*Dx + Dy*Dy); in_disk_phi = norm_radians(atan2(Dy, Dx)); -in_disk_rgn = floor((in_disk_phi + PI/4)/(PI/2)) + 1; +in_disk_rgn = floor((.999995*in_disk_phi + PI/4)/(PI/2)) + 1; out_square_a = select(in_disk_rgn, in_disk_r, (PI/2 - in_disk_phi)*in_disk_r/(PI/4), @@ -277,7 +277,7 @@ $cmd = "rcalc -if3 -e 'Omega:PI/($ns*$ns)' " . q{-e '$1=(0.265*$1+0.670*$2+0.065*$3)/Omega' }; if ($pctcull >= 0) { $cmd .= "-of $td/" . ($bmodnm,$fmodnm)[$forw] . ".flt " . - "| rttree_reduce -a -h -ff -t $pctcull -r $tensortree -g $ttlog2"; + "| rttree_reduce -h -ff -t $pctcull -r $tensortree -g $ttlog2"; system "$cmd" || die "Failure running rttree_reduce"; } else { $cmd .= "$td/" . ($bmodnm,$fmodnm)[$forw] . ".flt";