ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/ies2rad.c
(Generate patch)

Comparing ray/src/cv/ies2rad.c (file contents):
Revision 2.8 by greg, Fri Jun 4 14:40:25 1993 UTC vs.
Revision 2.11 by greg, Mon May 23 10:45:41 1994 UTC

# Line 40 | Line 40 | static char SCCSid[] = "$SunId$ LBL";
40                                          /* file types */
41   #define T_RAD           ".rad"
42   #define T_DST           ".dat"
43 < #define T_TLT           "+.dat"
43 > #define T_TLT           "%.dat"
44                                          /* shape types */
45   #define RECT            1
46   #define DISK            2
# Line 407 | Line 407 | char   *inpname, *outname;
407          }
408          if (lampcolor == NULL) {
409                  fprintf(stderr, "%s: warning - no lamp type\n", inpname);
410 +                fputs("# Unknown lamp type (used default)\n", outfp);
411                  lampcolor = defcolor;
412 <        }
412 >        } else if (lamptype == NULL)
413 >                fprintf(outfp,"# CIE(x,y) = (%f,%f)\n# Depreciation = %.1f%%\n",
414 >                                lampcolor[3], lampcolor[4], 100.*lampcolor[5]);
415          if (feof(inpfp)) {
416                  fprintf(stderr, "%s: not in IES format\n", inpname);
417                  goto readerr;
# Line 657 | Line 660 | makeshape(shp, width, length, height)          /* make source
660   register SHAPE  *shp;
661   double  width, length, height;
662   {
663 <        if (illumrad >= MINDIM/2.) {
663 >        if (illumrad/meters2out >= MINDIM/2.) {
664                  shp->type = SPHERE;
665 <                shp->w = shp->l = shp->h = 2.*illumrad;
665 >                shp->w = shp->l = shp->h = 2.*illumrad / meters2out;
666          } else if (width < MINDIM) {
667                  width = -width;
668                  if (width < MINDIM) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines