1 |
greg |
1.2 |
{ RCSid $Id$ } |
2 |
greg |
1.1 |
{ |
3 |
|
|
Calculate VL (visibility level) |
4 |
|
|
|
5 |
|
|
5/26/94 |
6 |
|
|
|
7 |
|
|
Taken from Bailey, Clear, Berman paper, JIES Summer 1993 |
8 |
|
|
} |
9 |
|
|
|
10 |
|
|
{ User must set: |
11 |
|
|
|
12 |
|
|
L Adaptation luminance in cd/m^2 |
13 |
|
|
dL Difference in luminance between background and foreground |
14 |
|
|
S Target size in minutes of arc |
15 |
|
|
|
16 |
|
|
Function computes: |
17 |
|
|
|
18 |
|
|
dLt Visible luminance threshold |
19 |
|
|
Sr Size below which Ricco's law applies |
20 |
|
|
VL Visibility level |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
sq(x) : x*x; |
24 |
|
|
|
25 |
|
|
fit(a1,a2,n) = a1 * (L^(1/n) + a2)^(n/2); |
26 |
|
|
|
27 |
|
|
A = fit(.40743,1.6074,2.8723); |
28 |
|
|
B = fit(.0840155,.43369,1.7188); |
29 |
|
|
|
30 |
|
|
Sr = (4 + 2*L)/(1 + L); |
31 |
|
|
|
32 |
|
|
dLt = if(Sr-S, sq(A/S), sq((B*(S-Sr)+A)/S)); |
33 |
|
|
|
34 |
|
|
VL = dL / dLt; |