| 1 |
< |
/* Copyright (c) 1990 Regents of the University of California */ |
| 1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
| 140 |
|
} |
| 141 |
|
if (dstrsrc > FTINY) { |
| 142 |
|
/* distribute source direction */ |
| 143 |
< |
dimlist[ndims++] = sn; |
| 144 |
< |
for (i = 0; i < 3; i++) { |
| 145 |
< |
dimlist[ndims] = i + 8831; |
| 146 |
< |
vd[i] = dstrsrc * source[sn].ss * |
| 147 |
< |
(1.0 - 2.0*urand(urind(ilhash(dimlist,ndims+1),samplendx))); |
| 148 |
< |
} |
| 149 |
< |
ndims--; |
| 143 |
> |
dimlist[ndims] = sn + 8831; |
| 144 |
> |
peano(vd, 3, urand(ilhash(dimlist,ndims+1)+samplendx), .01); |
| 145 |
> |
for (i = 0; i < 3; i++) |
| 146 |
> |
vd[i] = dstrsrc * source[sn].ss * (1. - 2.*vd[i]); |
| 147 |
|
if (source[sn].sflags & SFLAT) { /* project offset */ |
| 148 |
|
d = DOT(vd, source[sn].snorm); |
| 149 |
|
for (i = 0; i < 3; i++) |
| 244 |
|
int (*f)(); /* direct component coefficient function */ |
| 245 |
|
char *p; /* data for f */ |
| 246 |
|
{ |
| 247 |
+ |
extern int (*trace)(); |
| 248 |
|
extern double pow(); |
| 249 |
|
register int sn; |
| 250 |
|
int nshadcheck, ncnts; |
| 314 |
|
source[cntord[sn].sno].sflags & SFOLLOW )) { |
| 315 |
|
/* follow entire path */ |
| 316 |
|
raycont(&sr); |
| 317 |
+ |
if (trace != NULL) |
| 318 |
+ |
(*trace)(&sr); /* trace execution */ |
| 319 |
|
if (bright(sr.rcol) <= FTINY) |
| 320 |
|
continue; /* missed! */ |
| 321 |
|
copycolor(srccnt[cntord[sn].sno].val, sr.rcol); |