/usr/share/radiance/clouds.cal is in radiance-materials 4R1+20120125-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | {
Compute fractal clouds over image
Greg Ward 11/1/95
Needs also noise2.cal
Usage:
pcomb -f noise2.cal -f clouds.cal planet.pic > cloudy.pic
Typically, this will be used to add clouds to Earth.pic or
bigEarth.pic in the standard library distribution.
}
{ Modify the following two constants to your liking: }
cover_frac : 0.65; { average cloud cover (non-clear fraction) }
cloud_refl : 0.7; { average cloud reflectance (always white) }
{ Leave the rest alone. }
PI : 3.14159265358979323846;
clouds(u,v,s) = if(s-.5, noise2(sin(2*PI/xmax*x)+13.5,sin(2*PI/ymax*y)-10.3),
noise2(u/s,v/s)*s + clouds(u,v,2*s));
minres : if(xmax-ymax, ymax, xmax);
clamp(x) : if(x, if(x-1, 1, x), 0);
coef = clamp( 1 +
(.5/sqrt(cover_frac)) * (clouds(x/minres, y/minres, 10/minres) - 1)
) ;
cv = coef * cloud_refl;
pv = 1 - coef;
ro = cv + pv*ri(1);
go = cv + pv*gi(1);
bo = cv + pv*bi(1);
|