1 |
|
#!/bin/csh -f |
2 |
< |
# SCCSid "$SunId$ LBL" |
2 |
> |
# RCSid: $Id$ |
3 |
|
# |
4 |
|
# Interactive script to calculate daylight factors |
5 |
|
# |
28 |
|
(and octree) and the output is one or more color Radiance pictures. |
29 |
|
|
30 |
|
_EOF_ |
31 |
< |
echo -n "Have you already calculated an illuminance picture with dayfact? " |
32 |
< |
if ( "$<" =~ [yY]* ) then |
33 |
< |
readvar illumpic |
31 |
> |
echo "Have you already calculated an illuminance picture using dayfact?" |
32 |
> |
readvar illumpic |
33 |
> |
if ( $illumpic != $nofile ) then |
34 |
|
if ( ! -r $illumpic ) then |
35 |
|
echo "Cannot read $illumpic" |
36 |
|
exit 1 |
136 |
|
| rcalc -e '$1=($2+.5)/'"$wpres[1]*$wpsize[1]+$wporig[1]" \ |
137 |
|
-e '$2=(1-($1+.5)/'"$wpres[2])*$wpsize[2]+$wporig[2]" \ |
138 |
|
-e '$3='"$wporig[3]" -e '$4=0;$5=0;$6=1' \ |
139 |
< |
| rtrace $rtargs -h+ -I+ -ov -faf $octree \ |
140 |
< |
| pvalue -r -y $wpres[2] +x $wpres[1] -df > $temp1 |
139 |
> |
| rtrace $rtargs -h+ -I+ -ov -fac -x $wpres[1] -y $wpres[2] $octree \ |
140 |
> |
> $temp1 |
141 |
|
pfilt -h 20 -n 0 -x 300 -y 300 -p 1 -r 1 $temp1 > $illumpic |
142 |
|
endif |
143 |
|
set maxval=`getinfo < $illumpic | rcalc -i 'EXPOSURE=${e}' -e '$1=3/e'` |