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 1.6 by greg, Thu Jul 25 12:52:18 1991 UTC vs.
Revision 1.9 by greg, Tue Jul 30 13:00:26 1991 UTC

# Line 111 | Line 111 | char  *nm;
111                      for (j = 0; j < 3; j++)
112                          org[j] += .001*fa->norm[j];
113                                          /* send sample */
114 <                    raysamp(distarr+dim[1]*nazi+dim[2], org, dir, rt);
114 >                    raysamp(distarr+3*(dim[1]*nazi+dim[2]), org, dir, rt);
115                  }
116          rayflush(rt);
117                                  /* write out the face w/ distribution */
# Line 151 | Line 151 | char  *nm;
151          dim[0] = random();
152                                  /* sample sphere */
153          for (dim[1] = 0; dim[1] < nalt; dim[1]++)
154 <            for (dim[2] = 0; dim[2] < nazi; dim[2]++) {
155 <                if (il->nsamps > 2 && nazi > 20) {
156 <                    rounddir(dir, (dim[1]+.5)/nalt, (dim[2]+.5)/nazi);
157 <                    mkaxes(u, v, dir);
158 <                }
154 >            for (dim[2] = 0; dim[2] < nazi; dim[2]++)
155                  for (i = 0; i < il->nsamps; i++) {
156                                          /* random direction */
157                      dim[3] = 1;
# Line 164 | Line 160 | char  *nm;
160                      r2 = (dim[2]+urand(urind(ilhash(dim,4),i)))/nazi;
161                      rounddir(dir, r1, r2);
162                                          /* random location */
163 <                    if (il->nsamps <= 2 || nazi <= 20)
168 <                        mkaxes(u, v, dir);              /* yuck! */
163 >                    mkaxes(u, v, dir);          /* yuck! */
164                      dim[3] = 3;
165                      r3 = sqrt(urand(urind(ilhash(dim,4),i)));
166                      dim[3] = 4;
# Line 179 | Line 174 | char  *nm;
174                          dir[j] = -dir[j];
175                      }
176                                          /* send sample */
177 <                    raysamp(distarr+dim[1]*nazi+dim[2], org, dir, rt);
177 >                    raysamp(distarr+3*(dim[1]*nazi+dim[2]), org, dir, rt);
178                  }
184            }
179          rayflush(rt);
180                                  /* write out the sphere w/ distribution */
181          roundout(il, distarr, nalt, nazi);
# Line 243 | Line 237 | char  *nm;
237                                          .001*co->ad[j];
238  
239                                          /* send sample */
240 <                    raysamp(distarr+dim[1]*nazi+dim[2], org, dir, rt);
240 >                    raysamp(distarr+3*(dim[1]*nazi+dim[2]), org, dir, rt);
241                  }
242          rayflush(rt);
243                                  /* write out the ring w/ distribution */
# Line 278 | Line 272 | register struct rtproc  *rt;
272  
273          if (rt->nrays <= 0)
274                  return;
275 <        i = 6*rt->nrays + 3;
282 <        rt->buf[i++] = 0.; rt->buf[i++] = 0.; rt->buf[i] = 0.;
275 >        bzero(rt->buf+6*rt->nrays, 6*sizeof(float));
276          if ( process(rt->pd, (char *)rt->buf, (char *)rt->buf,
277                          3*sizeof(float)*rt->nrays,
278                          6*sizeof(float)*(rt->nrays+1)) <

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines