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.19 by greg, Tue Sep 18 03:35:09 2007 UTC vs.
Revision 2.20 by greg, Tue Sep 18 19:51:07 2007 UTC

# Line 38 | Line 38 | newdist(                       /* allocate & clear distribution array */
38                  free((void *)distarr);
39                  distarr = (COLORV *)malloc(sizeof(COLORV)*3*siz);
40                  if (distarr == NULL)
41 <                        error(SYSTEM, "Out of memory in newdist");
41 >                        error(SYSTEM, "out of memory in newdist");
42                  distsiz = siz;
43          }
44          memset(distarr, '\0', sizeof(COLORV)*3*siz);
# Line 53 | Line 53 | process_ray(RAY *r, int rv)
53          if (rv == 0)
54                  return(0);
55          if (rv < 0)
56 <                error(USER, "Ray tracing process died");
56 >                error(USER, "ray tracing process died");
57          if (r->rno >= distsiz)
58 <                error(INTERNAL, "Bad returned index in process_ray");
58 >                error(INTERNAL, "bad returned index in process_ray");
59          colp = &distarr[r->rno * 3];
60          addcolor(colp, r->rcol);
61          return(1);
# Line 73 | Line 73 | raysamp(       /* queue a ray sample */
73          int     rv;
74  
75          if ((ndx < 0) | (ndx >= distsiz))
76 <                error(INTERNAL, "Bad index in raysamp");
76 >                error(INTERNAL, "bad index in raysamp");
77          VCOPY(myRay.rorg, org);
78          VCOPY(myRay.rdir, dir);
79          myRay.rmax = .0;
# Line 142 | Line 142 | my_face(               /* make an illum face */
142          }
143          n = nalt*nazi;
144          newdist(n);
145 <                                /* take first edge longer than sqrt(area) */
145 >                                /* take first edge >= sqrt(area) */
146          for (j = fa->nv-1, i = 0; i < fa->nv; j = i++) {
147                  u[0] = VERTEX(fa,i)[0] - VERTEX(fa,j)[0];
148                  u[1] = VERTEX(fa,i)[1] - VERTEX(fa,j)[1];
# Line 198 | Line 198 | my_face(               /* make an illum face */
198                          return(my_default(ob, il, nm));
199                      }
200                      for (j = 0; j < 3; j++)
201 <                        org[j] += .001*fa->norm[j];
201 >                        org[j] += .0001*fa->norm[j];
202                                          /* send sample */
203                      raysamp(dim[1]*nazi+dim[2], org, dir);
204                  }
# Line 332 | Line 332 | my_ring(               /* make an illum ring */
332                      r2 = r3*sin(r2);
333                      for (j = 0; j < 3; j++)
334                          org[j] = CO_P0(co)[j] + r1*u[j] + r2*v[j] +
335 <                                        .001*co->ad[j];
336 <
335 >                                                .0001*co->ad[j];
336                                          /* send sample */
337                      raysamp(dim[1]*nazi+dim[2], org, dir);
338                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines