--- ray/src/gen/mkillum2.c 1994/01/07 14:51:46 2.6 +++ ray/src/gen/mkillum2.c 1997/07/09 11:24:52 2.8 @@ -1,4 +1,4 @@ -/* Copyright (c) 1991 Regents of the University of California */ +/* Copyright (c) 1995 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -163,8 +163,8 @@ char *nm; nalt = nazi = 1; else { n = 4.*PI * il->sampdens; - nalt = sqrt(n/PI) + .5; - nazi = PI*nalt + .5; + nalt = sqrt(2./PI*n) + .5; + nazi = PI/2.*nalt + .5; } n = nalt*nazi; distarr = (float *)calloc(n, 3*sizeof(float)); @@ -306,9 +306,9 @@ register struct rtproc *rt; bzero(rt->buf+6*rt->nrays, 6*sizeof(float)); errno = 0; if ( process(rt->pd, (char *)rt->buf, (char *)rt->buf, - 3*sizeof(float)*rt->nrays, + 3*sizeof(float)*(rt->nrays+1), 6*sizeof(float)*(rt->nrays+1)) < - 3*sizeof(float)*rt->nrays ) + 3*sizeof(float)*(rt->nrays+1) ) error(SYSTEM, "error reading from rtrace process"); i = rt->nrays; while (i--) {