ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/lib/covelight.cal
Revision: 1.2
Committed: Tue Mar 18 17:30:17 2003 UTC (22 years, 1 month ago) by greg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Log Message:
Decided to move ray/lib directory into non-CVS distribution

File Contents

# User Rev Content
1 greg 1.1 {
2     Compute distribution on ceiling or wall of cove lighting
3     system employing linear fixtures.
4    
5     10Feb91 Greg Ward
6    
7     This is the closed-form solution to the integral of
8     illumination from a one-dimensional extended source.
9     Solution assumes that both fixture endpoints are in front
10     of surface element -- negative values may result if this
11     assumption is wrong!
12    
13     Multiply cove_mult by radiant flux per unit source length
14     times cove surface reflectance. To account for interreflection
15     with room surfaces, multiply this value by 1/(1-RcRr), where
16     Rc is the average ceiling reflectance and Rr is the average
17     reflectance of the floor and walls (biased towards the floor).
18    
19     A1-A6 - Begin and end point coord's of first fixture
20     A7-A12, A13-A18, ... - Coord's for second, third, ... fixtures
21     }
22    
23     cove_mult = cove_sum(arg(0)/6, 1);
24    
25     cove_sum(n, i0) = if(n-.5,
26     cove_coef(
27     (arg(i0)-Px)*Nx
28     +(arg(i0+1)-Py)*Ny
29     +(arg(i0+2)-Pz)*Nz,
30     (arg(i0+3)-arg(i0))*Nx
31     +(arg(i0+4)-arg(i0+1))*Ny
32     +(arg(i0+5)-arg(i0+2))*Nz,
33     sq(arg(i0)-Px)
34     +sq(arg(i0+1)-Py)
35     +sq(arg(i0+2)-Pz),
36     (Px-arg(i0))*(arg(i0+3)-arg(i0))
37     +(Py-arg(i0+1))*(arg(i0+4)-arg(i0+1))
38     +(Pz-arg(i0+2))*(arg(i0+5)-arg(i0+2)),
39     sq(arg(i0+3)-arg(i0))
40     +sq(arg(i0+4)-arg(i0+1))
41     +sq(arg(i0+5)-arg(i0+2)))
42     + cove_sum(n-1, i0+6),
43     0);
44    
45     cove_coef(a, b, g, h, k) = 1/Sqrt(g*k-h*h)/(2*PI*PI*PI)
46     *( (a*k+b*h)/Sqrt(g*k-h*h)
47     *(atan((k-h)/Sqrt(g*k-h*h))+atan(h/Sqrt(g*k-h*h)))
48     + (a*k+b*h-a*h-b*g)/(k-2*h+g)
49     + (a*h+b*g)/g );