ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/tumblin.cal
Revision: 1.1
Committed: Sat Feb 22 02:07:21 2003 UTC (21 years, 2 months ago) by greg
Branch: MAIN
CVS Tags: rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# User Rev Content
1 greg 1.1 {
2     Mapping of Luminance to Brightness for CRT display.
3     Hand this file to pcomb(1) with the -f option.
4     The picture file should have been run previously through
5     the automatic exposure procedure of pfilt(1), and
6     pcomb should not be given -o option. Like so:
7    
8     pfilt input.pic | pcomb -f tumblin.cal - > output.pic
9    
10     Formulas adapted from Stevens by Tumblin and Rushmeier.
11    
12     29 May 1993
13     }
14     PI : 3.14159265358979323846; { Hmm, looks familiar... }
15     LAMBERT : 1e4/PI/WE; { Number of watts/sr/m2 in a Lambert }
16     DL : .027; { Maximum display luminance (Lamberts) }
17     AL : .5/le(1)*10^.84/LAMBERT; { Adaptation luminance (from exposure) }
18    
19     sq(x) : x*x;
20     aa(v) : .4*log10(v) + 2.92;
21     bb(v) : -.4*sq(log10(v)) + -2.584*log10(v) + 2.0208;
22    
23     power : aa(AL)/aa(DL);
24    
25     mult = li(1)^(power-1) *
26     ( LAMBERT^-power/DL * 10^((bb(AL)-bb(DL))/aa(DL)) / le(1) );
27    
28     ro = mult*ri(1);
29     go = mult*gi(1);
30     bo = mult*bi(1);