| 10 |
|
my @skycolor = (0.960, 1.004, 1.118); |
| 11 |
|
my $mf = 4; |
| 12 |
|
my $dosky = 1; |
| 13 |
+ |
my $headout = 1; |
| 14 |
+ |
my @origARGV = @ARGV; |
| 15 |
|
while ($#ARGV >= 0) { |
| 16 |
|
if ("$ARGV[0]" eq "-c") { |
| 17 |
|
@skycolor = @ARGV[1..3]; |
| 21 |
|
shift @ARGV; |
| 22 |
|
} elsif ("$ARGV[0]" eq "-d") { |
| 23 |
|
$dosky = 0; |
| 24 |
+ |
} elsif ("$ARGV[0]" eq "-h") { |
| 25 |
+ |
$headout = 0; |
| 26 |
|
} |
| 27 |
|
shift @ARGV; |
| 28 |
|
} |
| 147 |
|
for my $j (0..2) { $scolor[$j] += $wt * $sunval[$j]; } |
| 148 |
|
$tregval[$ndx[$i]] = "$scolor[0]\t$scolor[1]\t$scolor[2]\n"; |
| 149 |
|
} |
| 150 |
+ |
} |
| 151 |
+ |
# Output header if requested |
| 152 |
+ |
if ($headout) { |
| 153 |
+ |
print "#?RADIANCE\n"; |
| 154 |
+ |
print "genskyvec @origARGV\n"; |
| 155 |
+ |
print "NROWS=", $#tregval+1, "\n"; |
| 156 |
+ |
print "NCOLS=1\nNCOMP=3\n"; |
| 157 |
+ |
print "FORMAT=ascii\n"; |
| 158 |
+ |
print "\n"; |
| 159 |
|
} |
| 160 |
|
# Output our final vector |
| 161 |
|
print @tregval; |