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; |
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(ilhash(hlist,4)+dp->n))/h->nt); |
77 |
< |
hlist[3] = 1; |
77 |
< |
phi = 2.0*PI * (dp->p+urand(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); |
235 |
|
{ |
236 |
|
register int i; |
237 |
|
/* set number of divisions */ |
238 |
< |
hp->nt = sqrt(ambdiv * r->rweight * 0.5) + 0.5; |
239 |
< |
hp->np = 2 * hp->nt; |
238 |
> |
hp->nt = sqrt(ambdiv * r->rweight / PI) + 0.5; |
239 |
> |
hp->np = PI * hp->nt; |
240 |
|
/* make axes */ |
241 |
|
VCOPY(hp->uz, r->ron); |
242 |
|
hp->uy[0] = hp->uy[1] = hp->uy[2] = 0.0; |