--- ray/src/util/genklemsamp.pl 2009/06/19 18:42:06 2.5 +++ ray/src/util/genklemsamp.pl 2011/01/27 22:28:12 2.8 @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# RCSid $Id: genklemsamp.pl,v 2.5 2009/06/19 18:42:06 greg Exp $ +# RCSid $Id: genklemsamp.pl,v 2.8 2011/01/27 22:28:12 greg Exp $ # # Sample Klems (full) directions impinging on surface(s) # @@ -76,14 +76,15 @@ 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], $bcube[1]+$bcube[3]/2-$width/2*$vd[1], $bcube[2]+$bcube[3]/2-$width/2*$vd[2]); - push @vopts, ("-vh", $width, "-vh", $height); + push @vopts, ("-vh", $width, "-vv", $height); $vwset = `vwright @vopts V`; + $sca = sqrt($nsamp/($width*$height)); my $xres; my $yres; my $ntot = 0; @@ -98,9 +99,9 @@ if ($#ARGV >= 0) { q{-e 'nOK=sq(Vdx*$5+Vdy*$6+Vdz*$7)-.999' } . "-if7 -of > $td/origins.flt"; $ntot = -s "$td/origins.flt"; - $ntot /= 3*4; + $ntot /= 3*4; # number of bytes per sample position if ($ntot == 0) { - if ($sca < sqrt(199/($width*$height))) { + if ($nsamp < 200) { $sca = sqrt(200/($width*$height)); redo; }