--- ray/src/cv/ies2rad.c 1990/12/14 14:41:14 1.2 +++ ray/src/cv/ies2rad.c 1991/12/19 15:10:45 2.2 @@ -71,7 +71,7 @@ double illumrad = 0.0; /* radius for illum sphere */ typedef struct { int type; /* RECT, DISK, SPHERE */ double w, l, h; /* width, length, height */ - double area; /* effective radiating area */ + double area; /* max. projected area */ } SHAPE; /* a source shape */ int gargc; /* global argc (minus filenames) */ @@ -79,7 +79,6 @@ char **gargv; /* global argv */ extern char *strcpy(), *strcat(), *stradd(), *tailtrunc(), *filetrunc(), *filename(), *libname(), *fullname(), *malloc(); -extern double atof(); extern float *matchlamp(); @@ -551,7 +550,7 @@ char *mod, *name; perror(buf); return(-1); } - if (cvdata(in, datout, 2, nangles, 1./683., bounds) != 0) { + if (cvdata(in, datout, 2, nangles, 1./WHTEFFICACY, bounds) != 0) { fprintf(stderr, "dosource: bad distribution data\n"); fclose(datout); unlink(fullname(buf,name,T_DST)); @@ -696,10 +695,8 @@ double width, length, height; shp->area = shp->w * shp->l; break; case DISK: - shp->area = PI/4. * shp->w * shp->w; - break; case SPHERE: - shp->area = PI * shp->w * shp->w; + shp->area = PI/4. * shp->w * shp->w; break; } return(0);