This file is indexed.

/usr/bin/genambpos is in radiance 4R0+20110410-1build1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
#!/bin/csh -f
# RCSid $Id: genambpos.csh,v 3.2 2004/05/17 16:35:14 greg Exp $

# Mark ambient locations 
#
# John Mardaljevic                     
# Institute of Energy and Sustainable Development
# De Montfort University
# The Gateway
# Leicester
# LE1 9BH, UK
# +44 (0) 116 257 7972   
# +44 (0) 116 257 7981 (fax)
# 
# jm@dmu.ac.uk   
# http://www.iesd.dmu.ac.uk/~jm



set ambdat=none
set radius=0.05

alias readvar 'echo -n Enter \!:1 "[$\!:1]: ";set ans="$<";if("$ans" != "")set \!:1="$ans"'

cat <<_EOF_

            CREATE SCENE DESCRIPTION MARKERS FOR
                 AMBIENT SAMPLING LOCATIONS

This script puts coloured markers (spheres) at points where hemispherical
sampling was initiated.  The locations and levels are taken from the binary
ambient file.  The levels are colour coded -

       Level 0 = red
       Level 1 = green
       Level 2 = blue
       Level 3 = yellow
       Level 4 = cyan
       Level 5 = magenta
       Level 6 = pink 

To view the locations, include the file "amb_pos.rad" when re-creating
the octree.

_EOF_

rm -f amb_pos.rad

echo "Input ambient file"
readvar ambdat

echo "Input marker sphere radius"
readvar radius

getinfo $ambdat
lookamb -d -h $ambdat > af$$.tmp

set red=(1 0 0 1 0 1 1)
set grn=(0 1 0 1 1 0 0.5)
set blu=(0 0 1 0 1 1 0.5)

foreach j (1 2 3 4 5 6 7)

@ i = $j - 1

rcalc -e 'cond=eq($7,'"$i"');eq(a,b)=if(a-b+1e-7,b-a+1e-7,-1);$1=$1;$2=$2;$3=$3' af$$.tmp > amb_pos_lev$i

set empt=`wc -l < amb_pos_lev$i`

if ($empt !~ 0) then

echo "$empt ambient locations for level $i"

cat > sph_lev$i.fmt << _EOF_

mat_lev$i sphere sph_lev$i.\${recno}
0
0
4     \${ x1 } \${ y1 } \${ z1 }     $radius
_EOF_

cat >> amb_pos.rad << _EOF_
void plastic mat_lev$i
0
0
5   $red[$j]  $grn[$j]   $blu[$j]   0    0

!rcalc -e 'x1=\$1;y1=\$2;z1=\$3' -o sph_lev$i.fmt amb_pos_lev$i

_EOF_

else

rm amb_pos_lev$i

endif

end  

rm af$$.tmp