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

Comparing ray/src/util/findglare.c (file contents):
Revision 2.3 by greg, Fri Nov 13 13:19:16 1992 UTC vs.
Revision 2.7 by greg, Sun Mar 6 12:52:58 1994 UTC

# Line 55 | Line 55 | char   *argv[];
55          progname = argv[0];
56                                          /* process options */
57          for (i = 1; i < argc && argv[i][0] == '-'; i++) {
58 +                                                /* expand arguments */
59 +                while (rval = expandarg(&argc, &argv, i))
60 +                        if (rval < 0) {
61 +                                fprintf(stderr, "%s: cannot expand '%s'",
62 +                                                argv[0], argv[i]);
63 +                                exit(1);
64 +                        }
65                  rval = getviewopt(&ourview, argc-i, argv+i);
66                  if (rval >= 0) {
67                          i += rval;
# Line 105 | Line 112 | char   *argv[];
112                          combine = !combine;
113                          break;
114                  case 'd':
115 +                        if (argv[i][2] == 'v') {
116 +                                rtargv[rtargc++] = argv[i];
117 +                                break;
118 +                        }
119 +                        /* FALL THROUGH */
120                  case 'l':
121                  case 's':
122 +                case 'P':
123                          rtargv[rtargc++] = argv[i];
124                          rtargv[rtargc++] = argv[++i];
125                          break;
126 +                case 'w':
127 +                        rtargv[rtargc++] = argv[i];
128 +                        break;
129                  case 'a':
130                          rtargv[rtargc++] = argv[i];
131                          if (argv[i][2] == 'v') {
# Line 187 | Line 203 | char   *argv[];
203                  absorb_specks();                /* eliminate tiny sources */
204          cleanup();                              /* tidy up */
205                                                  /* print header */
206 +        newheader("RADIANCE", stdout);
207          printargs(argc, argv, stdout);
208          fputs(VIEWSTR, stdout);
209          fprintview(&ourview, stdout);
# Line 355 | Line 372 | int    x, y;
372                  xo = x-hl;
373          else
374                  xo = 0;
375 <        disc = 1. - (double)(xo*xo + y*y)/(sampdens*sampdens);
376 <        if (disc <= FTINY)
375 >        disc = 1. - (double)((long)xo*xo + (long)y*y)/((long)sampdens*sampdens);
376 >        if (disc <= FTINY*FTINY)
377                  return(0.);
378          return(1./(sampdens*sampdens*sqrt(disc)));
379   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines