3 |
|
{ |
4 |
|
Initialization file for Radiance. |
5 |
|
|
6 |
– |
4/14/86 |
7 |
– |
} |
8 |
– |
|
9 |
– |
{ |
6 |
|
The following are predefined: |
7 |
|
|
8 |
|
Dx, Dy, Dz - ray direction |
130 |
|
turbulencec(x,y,z,s) = if( s-1.01, 0, |
131 |
|
sgn(noise3(x/s,y/s,z/s))*noise3c(x/s,y/s,z/s) + |
132 |
|
turbulencec(x,y,z,2*s) ); |
133 |
+ |
|
134 |
+ |
{ Local (u,v) coordinates for planar surfaces } |
135 |
+ |
crosslen`private = Nx*Nx + Ny*Ny; |
136 |
+ |
{ U is distance from origin in XY-plane } |
137 |
+ |
U = if( crosslen`private - FTINY, |
138 |
+ |
(Py*Nx - Px*Ny)/crosslen`private, |
139 |
+ |
Px); |
140 |
+ |
{ V is defined so that N = U x V } |
141 |
+ |
V = if( crosslen`private - FTINY, |
142 |
+ |
Pz - Nz*(Px*Nx + Py*Ny)/crosslen`private, |
143 |
+ |
Py); |