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

Comparing ray/src/common/multisamp.c (file contents):
Revision 1.1 by greg, Thu Aug 22 11:55:37 1991 UTC vs.
Revision 2.5 by schorsch, Sat Jun 7 12:50:20 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1991 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Binary space partitioning curve for multidimensional sampling.
6   *
7   *      Written by Christophe Schlick
8   */
9  
10 + #include "copyright.h"
11 +
12 + #include <stdlib.h>
13 +
14 + #include "random.h"
15 +
16 + void
17   multisamp(t, n, r)      /* convert 1-dimensional sample to N dimensions */
18   double  t[];                    /* returned N-dimensional vector */
19   register int    n;              /* number of dimensions */
# Line 33 | Line 37 | double r;                      /* 1-dimensional sample [0,1) */
37          }
38          i = n;
39          while (i-- > 0)
40 <                t[i] = 1./256. * ti[i];
40 >                t[i] = 1./256. * (ti[i] + frandom());
41   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines