ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/genklemsamp.pl
(Generate patch)

Comparing ray/src/util/genklemsamp.pl (file contents):
Revision 2.1 by greg, Sun Jun 14 00:33:16 2009 UTC vs.
Revision 2.2 by greg, Tue Jun 16 04:54:08 2009 UTC

# Line 3 | Line 3
3   #
4   # Sample Klems (full) directions impinging on surface(s)
5   #
6 + #       G. Ward
7 + #
8   if ($#ARGV < 0) {
9 <        print "Usage: genklemsamp [-c N ][-f{a|f|d}] [view opts] [geom.rad ..]\n";
9 >        print STDERR, "Usage: genklemsamp [-c N ][-f{a|f|d}] [view opts] [geom.rad ..]\n";
10          exit 1;
11   }
12   my $td = `mktemp -d /tmp/genklemsamp.XXXXXX`;
# Line 25 | Line 27 | while ($#ARGV >= 0) {
27                  push @vopts, "@ARGV[0..1]";
28                  shift @ARGV;
29          } elsif ("$ARGV[0]" =~ /^-v./) {
30 <                print "Unsupported view option: $ARGV[0]\n";
30 >                print STDERR, "Unsupported view option: $ARGV[0]\n";
31                  exit 1;
32          } elsif ("$ARGV[0]" =~ /^-./) {
33 <                print "Unknown option: $ARGV[0]\n";
33 >                print STDERR, "Unknown option: $ARGV[0]\n";
34                  exit 1;
35          } else {
36                  last;
# Line 97 | Line 99 | if ($#ARGV >= 0) {
99                  $ntot = -s "$td/origins.flt";
100                  $ntot /= 3*4;
101                  if ($ntot == 0) {
102 <                        print "View direction does not correspond to any surfaces\n";
102 >                        print STDERR, "View direction does not correspond to any surfaces\n";
103                          exit 1;
104                  }
105                  $sca *= 1.05 * sqrt($nsamp/$ntot);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines