--- ray/src/rt/rayinit.cal 2003/02/22 02:07:29 2.13 +++ ray/src/rt/rayinit.cal 2013/10/08 18:59:44 2.16 @@ -1,4 +1,4 @@ -{ RCSid: $Id: rayinit.cal,v 2.13 2003/02/22 02:07:29 greg Exp $ } +{ RCSid $Id: rayinit.cal,v 2.16 2013/10/08 18:59:44 greg Exp $ } { Initialization file for Radiance. @@ -17,8 +17,12 @@ Kx, Ky, Kz - world k unit vector arg(n) - real arguments, arg(0) is count - For brdf functions, the following are also available: + For mesh objects, the following are available: + Lu, Lv - local (u,v) coordinates + + For *func & *data materials, the following are also available: + NxP, NyP, NzP - perturbed surface normal RdotP - perturbed ray dot product CrP, CgP, CbP - perturbed material color @@ -37,7 +41,7 @@ sin(x), cos(x), tan(x), asin(x), acos(x), - atan(x), atan2(y,x) - standard trig functions + atan(x), atan2(y,x) - standard trig functions (radians) floor(x), ceil(x) - g.l.b. & l.u.b. @@ -47,8 +51,6 @@ rand(x) - pseudo-random function (0 to 1) - hermite(p0,p1,r0,r1,t) - 1-dimensional hermite polynomial - noise3(x,y,z), noise3x(x,y,z), noise3y(x,y,z), noise3z(x,y,z) - noise function with gradient (-1 to 1) @@ -118,6 +120,11 @@ cross(i,v1,v2) : select(i, v1(2)*v2(3) - v1(3)*v2(2), fade(near_val,far_val,dist) : far_val + if (16-dist, (near_val-far_val)/(1+dist*dist), 0); + +hermite(p0,p1,r0,r1,t) : p0 * ((2*t-3)*t*t+1) + + p1 * (-2*t+3)*t*t + + r0 * (((t-2)*t+1)*t) + + r1 * ((t-1)*t*t); bezier(p1, p2, p3, p4, t) : p1 * (1+t*(-3+t*(3-t))) + p2 * 3*t*(1+t*(-2+t)) +