ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/tumblin.cal
Revision: 1.2
Committed: Wed Nov 21 18:10:45 2018 UTC (5 years, 5 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Changes since 1.1: +1 -0 lines
Error occurred while calculating annotation data.
Log Message:
Added missing RCSid tag

File Contents

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