ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/debugcal.csh
Revision: 2.6
Committed: Sat Feb 22 02:07:30 2003 UTC (21 years, 2 months ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1, rad4R1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9
Changes since 2.5: +1 -1 lines
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

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