ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/graypatch.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
Log Message:
Added missing RCSid tag

File Contents

# Content
1 { RCSid $Id$ }
2 {
3 Generate script of 11x8 sample set of gray patches
4 on 2000x1600 pixel canvas.
5 Input is column and row number (starting from 0)
6 }
7 col = $1; { input position }
8 row = $2;
9
10 mingray = 0; { reassign if desired }
11
12 GAMMA : 2.2;
13 NCOLS : 11;
14 NROWS : 8;
15 XRES : 2000;
16 YRES : 1600;
17 MARGIN : 5;
18 xpatch : floor((XRES-MARGIN)/NCOLS) - MARGIN;
19 ypatch : floor((YRES-MARGIN)/NROWS) - MARGIN;
20 textheight : floor(ypatch/7);
21 xpos = MARGIN + col*(xpatch + MARGIN);
22 ypos = MARGIN + row*(ypatch + MARGIN);
23 patchgray = mingray + row*NCOLS + col;
24 patchvalue = ((patchgray+.5)/256)^GAMMA;