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.4 by greg, Tue Feb 25 02:47:21 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 "random.h"
13 +
14 + void
15   multisamp(t, n, r)      /* convert 1-dimensional sample to N dimensions */
16   double  t[];                    /* returned N-dimensional vector */
17   register int    n;              /* number of dimensions */
# Line 33 | Line 35 | double r;                      /* 1-dimensional sample [0,1) */
35          }
36          i = n;
37          while (i-- > 0)
38 <                t[i] = 1./256. * ti[i];
38 >                t[i] = 1./256. * (ti[i] + frandom());
39   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines