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

Comparing ray/src/px/falsecolor.pl (file contents):
Revision 2.17 by greg, Wed Oct 14 02:39:10 2020 UTC vs.
Revision 2.18 by greg, Fri Nov 11 02:50:26 2022 UTC

# Line 27 | Line 27 | my $docont = '';               # Contours: -cl and -cb
27   my $doposter = 0;              # Posterization: -cp
28   my $doextrem = 0;              # Don't mark extrema
29   my $needfile = 0;
30 < my $showpal = 0;               # Show availabel colour palettes
30 > my $showpal = 0;               # Show available colour palettes
31  
32   while ($#ARGV >= 0) {
33      $_ = shift;
# Line 164 | Line 164 | or(a,b) : if(a,a,b);
164   EPS : 1e-7;
165   neq(a,b) : if(a-b-EPS,1,b-a-EPS);
166   btwn(a,x,b) : if(a-x,-1,b-x);
167 < clip(x) : if(x-1,1,if(x,x,0));
167 > clip(x) : min(1,max(x,0));
168   frac(x) : x - floor(x);
169   boundary(a,b) : neq(floor(ndivs*a),floor(ndivs*b));
170 < round(x):if(x-floor(x)-0.5,ceil(x),floor(x));
170 > round(x) : floor(x+.5);
171  
172   spec_red(x) = 1.6*x - .6;
173   spec_grn(x) = if(x-.375, 1.6-1.6*x, 8/3*x);
# Line 310 | Line 310 | if ($legwidth > 0) {
310      my $theight = floor($legwidth/(8/1.67));
311      my $stheight = $sheight <= $theight ? $sheight : $theight;
312      my $vlegheight = $sheight * $ndivs * (1+1.5/$ndivs);
313    my $text = "$label\n";
313      my $tslabpic = "$td/slabT.hdr";
314 <    open PSIGN, "| psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $stheight > $tslabpic";
316 <    print PSIGN "$text";
317 <    close PSIGN;
314 >    system "psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $stheight $label > $tslabpic";
315      my $loop = $ndivs+$haszero;
316      my $hlegheight = $sheight * ($loop) + $sheight * .5;
317 <    my $pcompost = qq[pcompos -b 0 0 0 =-0 $tslabpic 0 $hlegheight ];
317 >    my $pcompost = qq[pcompos -h -b 0 0 0 =-0 $tslabpic 0 $hlegheight ];
318      for (my $i=0; $i<$loop; $i++) {
319          my $imap = ($ndivs - $i) / $ndivs;
320          my $value = $scale;
# Line 328 | Line 325 | if ($legwidth > 0) {
325          }
326          # Have no more than 3 decimal places
327          $value =~ s/(\.[0-9]{$scaledigits})[0-9]*/$1/;
331        $text = "$value\n";
328          $tslabpic = "$td/slab$i.hdr";
329 <        open PSIGN, "| psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $stheight > $tslabpic";
334 <        print PSIGN "$text";
335 <        close PSIGN;
329 >        system "psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $stheight $value > $tslabpic";
330          $hlegheight = $sheight * ($loop - $i - 1) + $sheight * .5;
331          $pcompost .= qq[=-0 $tslabpic 0 $hlegheight ];
332      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines