| author | Axel Jacobs <axel@jaloxa.eu> |
| Tue, 28 Jun 2011 22:23:24 +0100 | |
| changeset 31 | 411573439171 |
| parent 0 | 0aa115157c9c |
| permissions | -rw-r--r-- |
|
0
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
1 |
#!/bin/csh -f |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
2 |
# RCSid: $Id: debugcal.csh,v 2.6 2003/02/22 02:07:30 greg Exp $ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
3 |
# |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
4 |
# Script to debug cal files for Radiance |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
5 |
# |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
6 |
# Takes octree and rcalc options as arguments. |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
7 |
# One of the rcalc options should be -f calfile. |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
8 |
# Note that the real arguments A1, A2, etc must also be given. |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
9 |
# Input is a ray origin and direction, such as that produced by ximage. |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
10 |
# |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
11 |
if ( $#argv < 2 ) then |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
12 |
echo "Usage: $0 octree [rcalc options]" |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
13 |
exit 1 |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
14 |
endif |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
15 |
if ( ! $?RAYPATH ) then |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
16 |
set RAYPATH=.:/usr/local/lib/ray |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
17 |
endif |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
18 |
set initfile= |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
19 |
foreach d (`echo $RAYPATH | sed 's/:/ /g'`) |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
20 |
if ( -r $d/rayinit.cal ) then |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
21 |
set initfile="-f $d/rayinit.cal" |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
22 |
break |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
23 |
endif |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
24 |
end |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
25 |
|
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
26 |
rtrace -h- -x 1 -odNplL $1 | rcalc -u -e 'Dx=$1;Dy=$2;Dz=$3' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
27 |
-e 'Nx=$4;Ny=$5;Nz=$6;Px=$7;Py=$8;Pz=$9' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
28 |
-e 'T=$10;Ts=$11' -e 'S:1;Tx:0;Ty:0;Tz:0' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
29 |
-e 'Ix:1;Iy:0;Iz:0;Jx:0;Jy:1;Jz:0;Kx:0;Ky:0;Kz:1' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
30 |
-e 'Rdot=-Dx*Nx-Dy*Ny-Dz*Nz' -e 'RdotP=Rdot' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
31 |
-e 'NxP=Nx;NyP=Ny;NzP=Nz' -e 'CrP=A1;CgP=A2;CbP=A3' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
32 |
-e 'DxA:0;DyA:0;DzA:0' \ |
|
0aa115157c9c
Added original CSH script from HEAD-20110409.
Axel Jacobs <axel@jaloxa.eu>
parents:
diff
changeset
|
33 |
$initfile $argv[2-]:q |