--- ray/src/util/glare.csh 1991/04/24 18:27:08 1.1 +++ ray/src/util/glare.csh 1991/05/08 11:08:01 1.10 @@ -53,6 +53,7 @@ If the viewpoint is not the same as the picture, an er If no view is specified, the view parameters are taken from the picture, so the view specification is optional unless you are starting from an octree. + _EOF_ readvar picture readvar octree @@ -61,6 +62,10 @@ _EOF_ echo "You must specify a picture or an octree" exit 1 endif + if ( $picture == $nofile && "$view" == "" ) then + echo "You must give a view if there is no picture" + exit 1 + endif if ( $picture != $nofile ) then if ( ! -r $picture ) then echo "Cannot read $picture" @@ -80,6 +85,10 @@ With an octree, you should give the same options for - so forth as are used to render the scene. Please enter them below. _EOF_ + if ($picture != $nofile) then + echo "These are the parameters from the picture:" + getinfo $picture + endif readvar rtargs set fgargs=($fgargs $rtargs $octree) endif @@ -90,9 +99,9 @@ _EOF_ if ("$<" =~ [yY]) then set fgargs=(-r 400 $fgargs) else - set fgargs=(-r 200 $fgargs) + set fgargs=(-r 250 $fgargs) endif - echo -n "Are these sources very bright? " + echo -n "Are these sources relatively bright? " if ("$<" =~ [nN]*) then set fgargs=(-c $fgargs) endif @@ -131,14 +140,10 @@ if ($?DISPLAY && $picture != $nofile) then echo "" echo "Displaying glare sources in '$picture'..." xglaresrc $picture $glarefile - if ($status) then - x11image =+0+0 -g 2.6 $picture & - sleep 40 - xglaresrc $picture $glarefile - endif endif -set ndxnam=("Guth Visual Comfort Probability" "Guth Disability Glare Ratio") -set ndxcom=(guth_vcp guth_dgr) +set ndxnam=("Guth Visual Comfort Probability" "Guth Disability Glare Ratio" "CIE Glare Index") +set ndxcom=("glarendx -t guth_vcp" "glarendx -t guth_dgr" "glarendx -t cie_cgi") +set bcdlvl=(50 124 18.5) while ( 1 ) echo "" echo " 0. Quit" @@ -172,10 +177,19 @@ while ( 1 ) else if ($octree != $nofile) then set subtitle="$subtitle $octree" endif + if ( "$subtitle" == "" ) then + set subtitle="`getinfo < $glarefile | grep findglare`" + endif cat <<_EOF_ > $plotfile +include=line.plt include=polar.plt title="$ndxnam[$choice]" subtitle="$subtitle" +Bdata= + 0 $bcdlvl[$choice] + 360 $bcdlvl[$choice] +; +Blabel="BCD level" Adata= _EOF_ getinfo - < $gndxfile >> $plotfile