ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/ambcomp.c
(Generate patch)

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 1.10 by greg, Wed Jul 24 10:36:13 1991 UTC vs.
Revision 1.11 by greg, Tue Aug 13 12:16:41 1991 UTC

# Line 60 | Line 60 | AMBHEMI  *h;
60   RAY  *r;
61   {
62          RAY  ar;
63 <        int  hlist[4];
63 >        int  hlist[3];
64 >        double  spt[2];
65          double  xd, yd, zd;
66          double  b2;
67          double  phi;
# Line 71 | Line 72 | RAY  *r;
72          hlist[0] = r->rno;
73          hlist[1] = dp->t;
74          hlist[2] = dp->p;
75 <        hlist[3] = 0;
76 <        zd = sqrt((dp->t+urand(urind(ilhash(hlist,4),dp->n)))/h->nt);
77 <        hlist[3] = 1;
77 <        phi = 2.0*PI * (dp->p+urand(urind(ilhash(hlist,4),dp->n)))/h->np;
75 >        peano(spt, 2, urand(ilhash(hlist,3)+dp->n), .01);
76 >        zd = sqrt((dp->t + spt[0])/h->nt);
77 >        phi = 2.0*PI * (dp->p + spt[1])/h->np;
78          xd = cos(phi) * zd;
79          yd = sin(phi) * zd;
80          zd = sqrt(1.0 - zd*zd);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines