--- ray/src/util/genklemsamp.pl 2009/06/19 18:42:06 2.5 +++ ray/src/util/genklemsamp.pl 2010/09/26 15:40:53 2.7 @@ -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.7 2010/09/26 15:40:53 greg Exp $ # # Sample Klems (full) directions impinging on surface(s) # @@ -82,8 +82,9 @@ if ($#ARGV >= 0) { 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; }