1 |
< |
{ RCSid: $Id$ } |
1 |
> |
{ RCSid $Id$ } |
2 |
|
{ |
3 |
|
Initialization file for Radiance. |
4 |
|
|
17 |
|
Kx, Ky, Kz - world k unit vector |
18 |
|
arg(n) - real arguments, arg(0) is count |
19 |
|
|
20 |
< |
For brdf functions, the following are also available: |
20 |
> |
For mesh objects, the following are available: |
21 |
|
|
22 |
+ |
Lu, Lv - local (u,v) coordinates |
23 |
+ |
|
24 |
+ |
For *func & *data materials, the following are also available: |
25 |
+ |
|
26 |
|
NxP, NyP, NzP - perturbed surface normal |
27 |
|
RdotP - perturbed ray dot product |
28 |
|
CrP, CgP, CbP - perturbed material color |
41 |
|
|
42 |
|
sin(x), cos(x), tan(x), |
43 |
|
asin(x), acos(x), |
44 |
< |
atan(x), atan2(y,x) - standard trig functions |
44 |
> |
atan(x), atan2(y,x) - standard trig functions (radians) |
45 |
|
|
46 |
|
floor(x), ceil(x) - g.l.b. & l.u.b. |
47 |
|
|
51 |
|
|
52 |
|
rand(x) - pseudo-random function (0 to 1) |
53 |
|
|
50 |
– |
hermite(p0,p1,r0,r1,t) - 1-dimensional hermite polynomial |
51 |
– |
|
54 |
|
noise3(x,y,z), noise3x(x,y,z), |
55 |
|
noise3y(x,y,z), noise3z(x,y,z) - noise function with gradient (-1 to 1) |
56 |
|
|
121 |
|
fade(near_val,far_val,dist) : far_val + |
122 |
|
if (16-dist, (near_val-far_val)/(1+dist*dist), 0); |
123 |
|
|
124 |
+ |
hermite(p0,p1,r0,r1,t) : p0 * ((2*t-3)*t*t+1) + |
125 |
+ |
p1 * (-2*t+3)*t*t + |
126 |
+ |
r0 * (((t-2)*t+1)*t) + |
127 |
+ |
r1 * ((t-1)*t*t); |
128 |
+ |
|
129 |
|
bezier(p1, p2, p3, p4, t) : p1 * (1+t*(-3+t*(3-t))) + |
130 |
|
p2 * 3*t*(1+t*(-2+t)) + |
131 |
|
p3 * 3*t*t*(1-t) + |
150 |
|
|
151 |
|
{ Normal distribution from uniform range (0,1) } |
152 |
|
|
153 |
< |
un2`P(t) : t - (2.515517+t*(.802853+t*.010328))/ |
153 |
> |
un2`P.(t) : t - (2.515517+t*(.802853+t*.010328))/ |
154 |
|
(1+t*(1.432788+t*(.189269+t*.001308))) ; |
155 |
< |
un1`P(p) : un2`P(sqrt(-2*log(p))) ; |
155 |
> |
un1`P.(p) : un2`P.(sqrt(-2*log(p))) ; |
156 |
|
|
157 |
< |
unif2norm(p) : if( .5-p, -un1`P(p), un1`P(1-p) ) ; |
157 |
> |
unif2norm(p) : if( .5-p, -un1`P.(p), un1`P.(1-p) ) ; |
158 |
|
|
159 |
|
nrand(x) = unif2norm(rand(x)); |
160 |
|
|
161 |
|
{ Local (u,v) coordinates for planar surfaces } |
162 |
< |
crosslen`P = Nx*Nx + Ny*Ny; |
162 |
> |
crosslen`P. = Nx*Nx + Ny*Ny; |
163 |
|
{ U is distance from projected Z-axis } |
164 |
< |
U = if( crosslen`P - FTINY, |
165 |
< |
(Py*Nx - Px*Ny)/crosslen`P, |
164 |
> |
U = if( crosslen`P. - FTINY, |
165 |
> |
(Py*Nx - Px*Ny)/crosslen`P., |
166 |
|
Px); |
167 |
|
{ V is defined so that N = U x V } |
168 |
< |
V = if( crosslen`P - FTINY, |
169 |
< |
Pz - Nz*(Px*Nx + Py*Ny)/crosslen`P, |
168 |
> |
V = if( crosslen`P. - FTINY, |
169 |
> |
Pz - Nz*(Px*Nx + Py*Ny)/crosslen`P., |
170 |
|
Py); |