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

Comparing ray/src/util/genskyvec.pl (file contents):
Revision 2.1 by greg, Thu Jul 2 02:13:08 2009 UTC vs.
Revision 2.2 by greg, Mon Jul 13 23:45:08 2009 UTC

# Line 56 | Line 56 | raccum(r) : if(r-.5, rnaz(r-1) + raccum(r-1), 0);
56   RowMax : 7*MF + 1;
57   Rmax : raccum(RowMax);
58   Rfindrow(r, rem) : if(rem-rnaz(r)-.5, Rfindrow(r+1, rem-rnaz(r)), r);
59 < Rrow = if(Rbin-(Rmax +.5), RowMax, Rfindrow(0, Rbin));
59 > Rrow = if(Rbin-(Rmax-.5), RowMax-1, Rfindrow(0, Rbin));
60   Rcol = Rbin - raccum(Rrow) - 1;
61   Razi_width = 2*PI / rnaz(Rrow);
62   RAH : alpha*DEGREE;
63   Razi = if(Rbin-.5, (Rcol + x2 - .5)*Razi_width, 2*PI*x2);
64 < Ralt = if(Rbin-.5, (Rrow + x1)*RAH, asin(2*x1-1));
64 > Ralt = if(Rbin-.5, (Rrow + x1)*RAH, asin(-x1));
65   Romega = if(.5-Rbin, 2*PI, if(Rmax-.5-Rbin,
66          Razi_width*(sin(RAH*(Rrow+1)) - sin(RAH*Rrow)),
67          2*PI*(1 - cos(RAH/2)) ) );
# Line 89 | Line 89 | unlink $octree;
89   my @bestdir;
90   if (@sundir) {
91          my $somega = ($sundir[3]/360)**2 * 3.141592654**3;
92 <        my $cmd = "cnt $nbins | rcalc -e '$rhcal' -e Rbin=recno " .
92 >        my $cmd = "cnt " . ($nbins-1) .
93 >                " | rcalc -e '$rhcal' -e Rbin=recno " .
94                  "-e 'dot=Dx*$sundir[0] + Dy*$sundir[1] + Dz*$sundir[2]' " .
95                  "-e 'cond=dot-.866' " .
96                  q{-e '$1=if(1-dot,acos(dot),0);$2=Romega;$3=recno' };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines