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.30 by greg, Mon Jun 4 23:05:34 2018 UTC vs.
Revision 2.31 by greg, Tue Jun 5 16:04:00 2018 UTC

# Line 20 | Line 20 | static const char      RCSid[] = "$Id$";
20   * Radiance (θ,φ) luminaire coordinates and then apply photometric and
21   * tilt data to generate Radiance light. θ is altitude from the
22   * negative z-axis and φ is azimuth from the positive x-axis,
23 < * increasing towards the positive y-axis. [??? Greg, is there a
24 < * source for this convention?] This system matches none of the usual
25 < * goniophotometric conventions, but it is closest to IES type C; V in
26 < * type C photometry is θ in Radiance and L is -φ.
23 > * increasing towards the positive y-axis. This system matches none of
24 > * the usual goniophotometric conventions, but it is closest to IES
25 > * type C; V in type C photometry is θ in Radiance and L is -φ.
26   *
27   * The ies2rad scene description for a luminaire LUM, with tilt data,
28   * uses the following Radiance scene description primitives:
# Line 207 | Line 206 | int    filerev = FIRSTREV;
206   #define U_METERS        2
207  
208   /* string lengths */
209 < /* Maximum input line is 132 characters including CR LF at end. */
210 < #define MAXLINE         133
209 > /* Maximum input line is 256 characters including CR LF at end. */
210 > #define MAXLINE         257
211   #define RMAXWORD        76
212  
213   /* End of LM-63-related #defines */
# Line 728 | Line 727 | k_match(
727          char    *hdl            /* header line */
728   )
729   {
730 +        /* Skip leading spaces */
731 +        while (isspace(*hdl))
732 +                hdl++;
733          /* The line has to begin with '[' */
734          if (*hdl++ != '[')
735                  return(0);
# Line 863 | Line 865 | ies2rad(               /* convert IES file */
865                   * in the "[LAMP]" and "[LAMPCAT]" keyword lines;
866                   * otherwise check all lines.  */
867                  if (lampcolor == NULL && checklamp(buf))
868 <                        lampcolor = matchlamp( buf[0] == '[' ?
868 >                        lampcolor = matchlamp(*sskip2(buf,0) == '[' ?
869                                                  keyargs(buf) : buf );
870                  /* Look for a materials and geometry file in the keywords. */
871                  if (keymatch(K_LMG, buf)) {
# Line 884 | Line 886 | ies2rad(               /* convert IES file */
886          } else if (lamptype == NULL)
887                  fprintf(outfp,"# CIE(x,y) = (%f,%f)\n# Depreciation = %.1f%%\n",
888                                  lampcolor[3], lampcolor[4], 100.*lampcolor[5]);
889 +
890          /* If the file ended before a "TILT=" line, that's an error. */
891          if (feof(inpfp)) {
892                  fprintf(stderr, "%s: not in IES format\n", inpname);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines