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

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.35 by gregl, Mon Jan 5 16:46:04 1998 UTC vs.
Revision 3.37 by gregl, Fri Jan 16 11:45:43 1998 UTC

# Line 109 | Line 109 | char   *argv[];
109                  }
110                                                  /* check settings */
111          checkvalues();
112 <                                                /* load RIF if rtrace */
113 <        if (ncprocs)
114 <                getradfile();
112 >                                                /* load rad input file */
113 >        getradfile();
114  
115          if (hdlist[0] == NULL) {                /* create new holodeck */
116                  HDGRID  hdg[HDMAX];
# Line 333 | Line 332 | register HDGRID        *gp;
332          extern char     *atos();
333          register int    i;
334          int     n;
335 <        double  len[3], maxlen, d;
335 >        double  len[3], d;
336          char    buf[64];
337  
338          if (!vdef(SECTION)) {
# Line 367 | Line 366 | register HDGRID        *gp;
366                                  &gp->xv[2][0], &gp->xv[2][1], &gp->xv[2][2],
367                                  &gp->grid[0], &gp->grid[1], &gp->grid[2]) < 12)
368                          badvalue(SECTION);
370                maxlen = 0.;
369                  for (i = 0; i < 3; i++)
370 <                        if ((len[i] = VLEN(gp->xv[i])) > maxlen)
371 <                                maxlen = len[i];
372 <                if (!vdef(GRID))
373 <                        d = 0.125*maxlen;
374 <                else if ((d = vflt(GRID)) <= FTINY)
370 >                        len[i] = VLEN(gp->xv[i]);
371 >                if (!vdef(GRID)) {
372 >                        d = 2/5e5*( len[0]*len[0]*(len[1]*len[1] +
373 >                                        len[2]*len[2] + 4*len[1]*len[2])
374 >                                + len[1]*len[1]*len[2]*(len[2] + 4*len[0])
375 >                                + 4*len[0]*len[1]*len[2]*len[2] );
376 >                        d = sqrt(sqrt(d));
377 >                } else if ((d = vflt(GRID)) <= FTINY)
378                          badvalue(GRID);
379                  for (i = 0; i < 3; i++)
380                          if (gp->grid[i] <= 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines