ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/noise.cal
Revision: 1.1
Committed: Sat Feb 22 02:07:21 2003 UTC (21 years, 1 month ago) by greg
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 frac(x)=x-floor(x);
2
3 hermite(p0,p1,r0,r1,t) = p0 * ((2*t-3)*t*t+1) +
4 p1 * (-2*t+3)*t*t +
5 r0 * (((t-2)*t+1)*t) +
6 r1 * ((t-1)*t*t);
7
8 rand2a(x) = 1-2*rand(.69692*x);
9 rand2b(x) = 1-2*rand(.05393*x);
10
11 noise(x,y) = noise_1(floor(x),frac(x),ceil(x));
12
13 noise_1(xl,xd,xu) = hermite(
14 rand2a(xl),
15 rand2a(xu),
16 rand2b(xl),
17 rand2b(xu),
18 xd);