--- ray/src/cv/ies2rad.c 1993/06/04 14:40:25 2.8 +++ ray/src/cv/ies2rad.c 1994/05/23 10:45:41 2.11 @@ -40,7 +40,7 @@ static char SCCSid[] = "$SunId$ LBL"; /* file types */ #define T_RAD ".rad" #define T_DST ".dat" -#define T_TLT "+.dat" +#define T_TLT "%.dat" /* shape types */ #define RECT 1 #define DISK 2 @@ -407,8 +407,11 @@ char *inpname, *outname; } if (lampcolor == NULL) { fprintf(stderr, "%s: warning - no lamp type\n", inpname); + fputs("# Unknown lamp type (used default)\n", outfp); lampcolor = defcolor; - } + } else if (lamptype == NULL) + fprintf(outfp,"# CIE(x,y) = (%f,%f)\n# Depreciation = %.1f%%\n", + lampcolor[3], lampcolor[4], 100.*lampcolor[5]); if (feof(inpfp)) { fprintf(stderr, "%s: not in IES format\n", inpname); goto readerr; @@ -657,9 +660,9 @@ makeshape(shp, width, length, height) /* make source register SHAPE *shp; double width, length, height; { - if (illumrad >= MINDIM/2.) { + if (illumrad/meters2out >= MINDIM/2.) { shp->type = SPHERE; - shp->w = shp->l = shp->h = 2.*illumrad; + shp->w = shp->l = shp->h = 2.*illumrad / meters2out; } else if (width < MINDIM) { width = -width; if (width < MINDIM) {