ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/glare.csh
(Generate patch)

Comparing ray/src/util/glare.csh (file contents):
Revision 1.1 by greg, Wed Apr 24 18:27:08 1991 UTC vs.
Revision 1.11 by greg, Tue Nov 12 12:07:24 1991 UTC

# Line 53 | Line 53 | If the viewpoint is not the same as the picture, an er
53   If no view is specified, the view parameters are taken from the picture,
54   so the view specification is optional unless you are starting from an
55   octree.
56 +
57   _EOF_
58          readvar picture
59          readvar octree
# Line 61 | Line 62 | _EOF_
62                  echo "You must specify a picture or an octree"
63                  exit 1
64          endif
65 +        if ( $picture == $nofile && "$view" == "" ) then
66 +                echo "You must give a view if there is no picture"
67 +                exit 1
68 +        endif
69          if ( $picture != $nofile ) then
70                  if ( ! -r $picture ) then
71                          echo "Cannot read $picture"
72                          exit 1
73                  endif
74 <                set fgargs=($fgargs -p $picture -vf $picture)
74 >                set fgargs=($fgargs -p $picture)
75 >                if ( "$view" != "" ) then
76 >                        set view=(-vf $picture $view)
77 >                endif
78          endif
79          set fgargs=($fgargs $view)
80          if ( $octree != $nofile ) then
# Line 80 | Line 88 | With an octree, you should give the same options for -
88   so forth as are used to render the scene.  Please enter them below.
89  
90   _EOF_
91 +                if ($picture != $nofile) then
92 +                        echo "These are the parameters from the picture:"
93 +                        getinfo $picture
94 +                endif
95                  readvar rtargs
96                  set fgargs=($fgargs $rtargs $octree)
97          endif
# Line 90 | Line 102 | _EOF_
102                  if ("$<" =~ [yY]) then
103                          set fgargs=(-r 400 $fgargs)
104                  else
105 <                        set fgargs=(-r 200 $fgargs)
105 >                        set fgargs=(-r 250 $fgargs)
106                  endif
107 <                echo -n "Are these sources very bright? "
107 >                echo -n "Are these sources relatively bright? "
108                  if ("$<" =~ [nN]*) then
109                          set fgargs=(-c $fgargs)
110                  endif
# Line 126 | Line 138 | _EOF_
138          echo "Starting calculation..."
139          echo findglare $fgargs
140          findglare $fgargs > $glarefile
141 +        if ($status) then
142 +                echo "Uh-oh.  Something went wrong with findglare\!"
143 +                rm $glarefile
144 +                exit 1
145 +        endif
146   endif
147   if ($?DISPLAY && $picture != $nofile) then
148          echo ""
149          echo "Displaying glare sources in '$picture'..."
150          xglaresrc $picture $glarefile
134        if ($status) then
135                x11image =+0+0 -g 2.6 $picture &
136                sleep 40
137                xglaresrc $picture $glarefile
138        endif
151   endif
152 < set ndxnam=("Guth Visual Comfort Probability" "Guth Disability Glare Ratio")
153 < set ndxcom=(guth_vcp guth_dgr)
152 > set ndxnam=("Guth Visual Comfort Probability" "Guth Disability Glare Ratio" "CIE Glare Index")
153 > set ndxcom=("glarendx -t guth_vcp" "glarendx -t guth_dgr" "glarendx -t cie_cgi")
154 > set bcdlvl=(50 124 18.5)
155   while ( 1 )
156          echo ""
157          echo "  0.  Quit"
# Line 172 | Line 185 | while ( 1 )
185                          else if ($octree != $nofile) then
186                                  set subtitle="$subtitle $octree"
187                          endif
188 +                        if ( "$subtitle" == "" ) then
189 +                                set subtitle="`getinfo < $glarefile | grep findglare`"
190 +                        endif
191                          cat <<_EOF_ > $plotfile
192 + include=line.plt
193   include=polar.plt
194   title="$ndxnam[$choice]"
195   subtitle="$subtitle"
196 + Bdata=
197 +        0       $bcdlvl[$choice]
198 +        360     $bcdlvl[$choice]
199 + ;
200 + Blabel="BCD level"
201   Adata=
202   _EOF_
203                          getinfo - < $gndxfile >> $plotfile

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines