This file is indexed.

/usr/share/radiance/sphsamp.cal is in radiance-materials 4R0+20110410-1build1.

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
{ RCSid $Id: sphsamp.cal,v 1.3 2005/02/15 23:45:14 greg Exp $ }
{
	Jittered sampling of a sphere

	2/15/2005	G. Ward

	Constant:
		N -		total number of samples on sphere
	Input:
		i -		sample number [0,N-1]
	Output:
		theta	- polar angle (0-PI)
		phi_un	- azimuthal angle (unnormalized)
		phi	- azimuthal angle (0-2*PI)
		Dx	- X-component of direction vector
		Dy	- Y-component of direction vector
		Dz	- Z-component of direction vector
}
S : .7;			{ jitter amount (0-1) }

k : 2*sqrt(PI/N);	{ k^2 is solid angle of each sample }

mod(n,d) : n - floor(n/d)*d;

alpha0 = asin(2/N*(i+.5) - 1);

theta = alpha0 + PI/2 + k*S*(rand(.35*i+10.3) - .5);
phi_un = sqrt(PI*N)*alpha0 + k*S*(rand(-.83*i-17.9) - .5);
phi = mod(phi_un, 2*PI);

sint = sin(theta);
Dx = cos(phi)*sint;
Dy = sin(phi)*sint;
Dz = cos(theta);