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

Comparing ray/src/gen/mkillum2.c (file contents):
Revision 2.3 by greg, Wed Aug 12 14:44:15 1992 UTC vs.
Revision 2.4 by greg, Thu Aug 13 10:03:19 1992 UTC

# Line 67 | Line 67 | char  *nm;
67          if (distarr == NULL)
68                  error(SYSTEM, "out of memory in o_face");
69                                  /* take first edge longer than sqrt(area) */
70 <        for (i = 1; i < fa->nv; i++) {
71 <                for (j = 0; j < 3; j++)
72 <                        u[j] = VERTEX(fa,i)[j] - VERTEX(fa,i-1)[j];
70 >        for (j = fa->nv-1, i = 0; i < fa->nv; j = i++) {
71 >                u[0] = VERTEX(fa,i)[0] - VERTEX(fa,j)[0];
72 >                u[1] = VERTEX(fa,i)[1] - VERTEX(fa,j)[1];
73 >                u[2] = VERTEX(fa,i)[2] - VERTEX(fa,j)[2];
74                  if (DOT(u,u) >= fa->area-FTINY)
75                          break;
76          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines