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.7 by greg, Thu Jul 25 14:12:22 1991 UTC vs.
Revision 1.8 by greg, Thu Jul 25 14:43:15 1991 UTC

# 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 181 | Line 176 | char  *nm;
176                                          /* send sample */
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines