--- ray/src/rt/ambcomp.c 1991/07/24 10:36:13 1.10 +++ ray/src/rt/ambcomp.c 1991/08/13 12:16:41 1.11 @@ -60,7 +60,8 @@ AMBHEMI *h; RAY *r; { RAY ar; - int hlist[4]; + int hlist[3]; + double spt[2]; double xd, yd, zd; double b2; double phi; @@ -71,10 +72,9 @@ RAY *r; hlist[0] = r->rno; hlist[1] = dp->t; hlist[2] = dp->p; - hlist[3] = 0; - zd = sqrt((dp->t+urand(urind(ilhash(hlist,4),dp->n)))/h->nt); - hlist[3] = 1; - phi = 2.0*PI * (dp->p+urand(urind(ilhash(hlist,4),dp->n)))/h->np; + peano(spt, 2, urand(ilhash(hlist,3)+dp->n), .01); + zd = sqrt((dp->t + spt[0])/h->nt); + phi = 2.0*PI * (dp->p + spt[1])/h->np; xd = cos(phi) * zd; yd = sin(phi) * zd; zd = sqrt(1.0 - zd*zd);