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

Comparing ray/src/util/genambpos.pl (file contents):
Revision 2.1 by greg, Thu Apr 24 23:15:42 2014 UTC vs.
Revision 2.2 by greg, Fri Apr 25 18:13:47 2014 UTC

# Line 5 | Line 5
5   #
6   use strict;
7   sub userror {
8 <        print STDERR "Usage: genambpos [-l lvl][-s scale][-p][-d] scene.amb > ambloc.rad\n";
8 >        print STDERR "Usage: genambpos [-l lvl][-w minwt][-s scale][-p][-d] scene.amb > ambloc.rad\n";
9          exit 1;
10   }
11   my $lvlsel = -1;
12   my $scale = 0.25;
13   my $doposgrad = 0;
14   my $dodirgrad = 0;
15 + my $minwt = 0.5001**6;
16   my $savedARGV = "genambpos @ARGV";
17   # Get options
18   while ($#ARGV >= 0) {
# Line 22 | Line 23 | while ($#ARGV >= 0) {
23          } elsif ("$ARGV[0]" =~ /^-l/) {
24                  $lvlsel = $ARGV[1];
25                  shift @ARGV;
26 +        } elsif ("$ARGV[0]" =~ /^-w/) {
27 +                $minwt = $ARGV[1];
28 +                shift @ARGV;
29          } elsif ("$ARGV[0]" =~ /^-s/) {
30                  $scale = $ARGV[1];
31                  shift @ARGV;
# Line 49 | Line 53 | posglow sphere position${recno}
53   0
54   4 ${px} ${py} ${pz} ${psiz}
55  
56 < posglow cone pgarrow${recno}
56 > void glow arrglow
57   0
58   0
59 + 4 ${wt*agr} ${wt*agg} ${wt*agb} 0
60 +
61 + arrglow cone pgarrow${recno}
62 + 0
63 + 0
64   8
65          ${ cx0 }        ${ cy0 }        ${ cz0 }
66          ${ cx1 }        ${ cy1 }        ${ cz1 }
# Line 123 | Line 132 | dgval ring dgdisk${recno}b
132   $outfmt .= $dirgradfmt if ($dodirgrad);
133   # Load & convert ambient values
134   print "# Output produced by: $savedARGV\n";
135 < system "lookamb -h -d $ARGV[0] | rcalc -e 'LV:$lvlsel;SF:$scale' -f rambpos.cal -o '$outfmt'\n";
135 > system "lookamb -h -d $ARGV[0] | rcalc -e 'LV:$lvlsel;MW:$minwt;SF:$scale'" .
136 >                " -f rambpos.cal -o '$outfmt'";
137   exit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines