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.3 by greg, Tue Jun 16 17:18:38 2009 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines