--- ray/src/util/genklemsamp.pl 2010/09/26 15:40:53 2.7 +++ ray/src/util/genklemsamp.pl 2011/04/11 03:47:46 2.9 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genklemsamp.pl,v 2.7 2010/09/26 15:40:53 greg Exp $ +# RCSid $Id: genklemsamp.pl,v 2.9 2011/04/11 03:47:46 greg Exp $ # # Sample Klems (full) directions impinging on surface(s) # @@ -76,7 +76,7 @@ if ($#ARGV >= 0) { push @vd, $_; $_ = $vwset; s/^.*Vdz://; s/;.*$//; push @vd, $_; - my @bcube = split /\s+/, `getinfo -d < $td/surf.oct`; + my @bcube = split ' ', `getinfo -d < $td/surf.oct`; $width = $bcube[3]*sqrt(3); $height = $width; push @vopts, ("-vp", $bcube[0]+$bcube[3]/2-$width/2*$vd[0], @@ -119,9 +119,9 @@ if ($#ARGV >= 0) { "-e 'cond=($nsamp-outno+1)/($ntot-recno+1)-rand($rn+recno)' " . "-e 'Kbin=$k;x1=rand($r1+recno);x2=rand($r2+recno)' " . q{-e '$1=$1+Vo*Vdx; $2=$2+Vo*Vdy; $3=$3+Vo*Vdz' } . - q{-e '$4=K0*Vhx-K1*Vvx+K2*Vdx' } . - q{-e '$5=K0*Vhy-K1*Vvy+K2*Vdy' } . - q{-e '$6=K0*Vhz-K1*Vvz+K2*Vdz' } . + q{-e '$4=-K0*Vhx-K1*Vvx+K2*Vdx' } . + q{-e '$5=-K0*Vhy-K1*Vvy+K2*Vdy' } . + q{-e '$6=-K0*Vhz-K1*Vvz+K2*Vdz' } . "-if3 $td/origins.flt"; } } else { @@ -143,9 +143,9 @@ if ($#ARGV >= 0) { q{-e '$1=Vpx+Vo*Vdx+hpos*Vhx+vpos*Vvx' } . q{-e '$2=Vpy+Vo*Vdy+hpos*Vhy+vpos*Vvy' } . q{-e '$3=Vpz+Vo*Vdz+hpos*Vhz+vpos*Vvz' } . - q{-e '$4=K0*Vhx-K1*Vvx+K2*Vdx' } . - q{-e '$5=K0*Vhy-K1*Vvy+K2*Vdy' } . - q{-e '$6=K0*Vhz-K1*Vvz+K2*Vdz' } ; + q{-e '$4=-K0*Vhx-K1*Vvx+K2*Vdx' } . + q{-e '$5=-K0*Vhy-K1*Vvy+K2*Vdy' } . + q{-e '$6=-K0*Vhz-K1*Vvz+K2*Vdz' } ; } } system "rm -rf $td";