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

Comparing ray/src/rt/noise3.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:09:23 1991 UTC vs.
Revision 2.5 by greg, Thu Oct 31 10:58:36 1996 UTC

# Line 14 | Line 14 | static char SCCSid[] = "$SunId$ LBL";
14   *     5/19/88  Added fractal noise function
15   */
16  
17 + #include  <math.h>
18  
19   #define  A              0
20   #define  B              1
# Line 35 | Line 36 | static char SCCSid[] = "$SunId$ LBL";
36                                          r0*hpoly3(t) + \
37                                          r1*hpoly4(t) )
38  
39 < static char  noise_name[4][8] = {"noise3a", "noise3b", "noise3c", "noise3"};
39 > static char  noise_name[4][8] = {"noise3x", "noise3y", "noise3z", "noise3"};
40   static char  fnoise_name[] = "fnoise3";
41   static char  hermite_name[] = "hermite";
42  
43   double  *noise3(), fnoise3(), argument(), frand();
44 + static  interpolate();
45  
46   static long  xlim[3][2];
47   static double  xarg[3];
48  
49 < #define  EPSILON        .0001           /* error allowed in fractal */
49 > #define  EPSILON        .001            /* error allowed in fractal */
50  
51   #define  frand3(x,y,z)  frand(17*(x)+23*(y)+29*(z))
52  
# Line 99 | Line 101 | double *
101   noise3(xnew)                    /* compute the noise function */
102   register double  xnew[3];
103   {
102        extern double  floor();
104          static double  x[3] = {-100000.0, -100000.0, -100000.0};
105          static double  f[4];
106  
# Line 156 | Line 157 | double
157   fnoise3(p)                      /* compute fractal noise function */
158   double  p[3];
159   {
159        double  floor();
160          long  t[3], v[3], beg[3];
161          double  fval[8], fc;
162          int  branch;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines