38 |
|
free((void *)distarr); |
39 |
|
distarr = (COLORV *)malloc(sizeof(COLORV)*3*siz); |
40 |
|
if (distarr == NULL) |
41 |
< |
error(SYSTEM, "Out of memory in newdist"); |
41 |
> |
error(SYSTEM, "out of memory in newdist"); |
42 |
|
distsiz = siz; |
43 |
|
} |
44 |
|
memset(distarr, '\0', sizeof(COLORV)*3*siz); |
53 |
|
if (rv == 0) |
54 |
|
return(0); |
55 |
|
if (rv < 0) |
56 |
< |
error(USER, "Ray tracing process died"); |
56 |
> |
error(USER, "ray tracing process died"); |
57 |
|
if (r->rno >= distsiz) |
58 |
< |
error(INTERNAL, "Bad returned index in process_ray"); |
58 |
> |
error(INTERNAL, "bad returned index in process_ray"); |
59 |
|
colp = &distarr[r->rno * 3]; |
60 |
|
addcolor(colp, r->rcol); |
61 |
|
return(1); |
73 |
|
int rv; |
74 |
|
|
75 |
|
if ((ndx < 0) | (ndx >= distsiz)) |
76 |
< |
error(INTERNAL, "Bad index in raysamp"); |
76 |
> |
error(INTERNAL, "bad index in raysamp"); |
77 |
|
VCOPY(myRay.rorg, org); |
78 |
|
VCOPY(myRay.rdir, dir); |
79 |
|
myRay.rmax = .0; |
142 |
|
} |
143 |
|
n = nalt*nazi; |
144 |
|
newdist(n); |
145 |
< |
/* take first edge longer than sqrt(area) */ |
145 |
> |
/* take first edge >= sqrt(area) */ |
146 |
|
for (j = fa->nv-1, i = 0; i < fa->nv; j = i++) { |
147 |
|
u[0] = VERTEX(fa,i)[0] - VERTEX(fa,j)[0]; |
148 |
|
u[1] = VERTEX(fa,i)[1] - VERTEX(fa,j)[1]; |
198 |
|
return(my_default(ob, il, nm)); |
199 |
|
} |
200 |
|
for (j = 0; j < 3; j++) |
201 |
< |
org[j] += .001*fa->norm[j]; |
201 |
> |
org[j] += .0001*fa->norm[j]; |
202 |
|
/* send sample */ |
203 |
|
raysamp(dim[1]*nazi+dim[2], org, dir); |
204 |
|
} |
332 |
|
r2 = r3*sin(r2); |
333 |
|
for (j = 0; j < 3; j++) |
334 |
|
org[j] = CO_P0(co)[j] + r1*u[j] + r2*v[j] + |
335 |
< |
.001*co->ad[j]; |
336 |
< |
|
335 |
> |
.0001*co->ad[j]; |
336 |
|
/* send sample */ |
337 |
|
raysamp(dim[1]*nazi+dim[2], org, dir); |
338 |
|
} |