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

Comparing ray/src/gen/glaze.csh (file contents):
Revision 2.7 by greg, Mon Feb 11 19:18:25 2008 UTC vs.
Revision 2.8 by greg, Thu Nov 5 19:00:50 2009 UTC

# Line 8 | Line 8
8   # Funding for this development generously provided by Visarc, Inc.
9   # (http://www.visarc.com)
10   #
11 + # Nov. 2009 Jack de Valpine - Visarc, Inc.
12 + #     -f option now clears the internal demo database and accepts
13 + #        a clear glass definition as the first entry
14 + #        in the database file
15 + #        
16  
17   #################################################################
18   #
# Line 16 | Line 21
21   # If the user tries to enter two coated surfaces on the same
22   # pane, the script complains and exits.
23   #
24 < # Supported surface types:
24 > # Supported surface types (clear glass prepended below):
25   #
26 < set sn_arr=("clear glass" "VE1-2M low-E coating" "PVB laminated" "V-175 white frit" "V-933 warm gray frit")
26 > set sn_arr=("VE1-2M low-E coating" "PVB laminated" "V-175 white frit" "V-933 warm gray frit")
27   # Glass-side hemispherical reflectances for each surface type:
28 < set rg_r_arr=(0.074 0.065 .11 0.33 0.15)
29 < set rg_g_arr=(0.077 0.058 .11 0.33 0.15)
30 < set rg_b_arr=(0.079 0.067 .11 0.33 0.15)
28 > set rg_r_arr=(0.065 .11 0.33 0.15)
29 > set rg_g_arr=(0.058 .11 0.33 0.15)
30 > set rg_b_arr=(0.067 .11 0.33 0.15)
31   # Coating-side hemispherical reflectance for each surface type:
32 < set rc_r_arr=(0.074 0.042 .11 0.59 0.21)
33 < set rc_g_arr=(0.077 0.049 .11 0.59 0.21)
34 < set rc_b_arr=(0.079 0.043 .11 0.59 0.21)
32 > set rc_r_arr=(0.042 .11 0.59 0.21)
33 > set rc_g_arr=(0.049 .11 0.59 0.21)
34 > set rc_b_arr=(0.043 .11 0.59 0.21)
35   # Hemispherical (normal) transmittance for each surface type:
36 < set tn_r_arr=(0.862 0.756 0.63 0.21 0.09)
37 < set tn_g_arr=(0.890 0.808 0.63 0.21 0.09)
38 < set tn_b_arr=(0.886 0.744 0.63 0.21 0.09)
36 > set tn_r_arr=(0.756 0.63 0.21 0.09)
37 > set tn_g_arr=(0.808 0.63 0.21 0.09)
38 > set tn_b_arr=(0.744 0.63 0.21 0.09)
39   # Boolean whether coatings can have partial coverage:
40 < set part_arr=(0 0 0 1 1)
40 > set part_arr=(0 0 1 1)
41  
42   set gfiles=()
43   while ($#argv > 0)
# Line 42 | Line 47 | while ($#argv > 0)
47                  exit 1
48          endif
49          shift argv
50 +        # Clear internal default database
51 +        set sn_arr=()
52 +        set rg_r_arr=() ; set rg_g_arr=() ; set rg_b_arr=()
53 +        set rc_r_arr=() ; set rc_g_arr=() ; set rc_b_arr=()
54 +        set tn_r_arr=() ; set tn_g_arr=() ; set tn_b_arr=()
55 +        set part_arr=()
56          set gf="$argv[1]"
57          shift argv
58          set gfiles=($gfiles:q $gf:q)
# Line 73 | Line 84 | while ($#argv > 0)
84                  @ i++
85          end
86   end
87 < if (! $#gfiles) unset gfiles
87 > if (! $#gfiles) then
88 >        unset gfiles
89 >        echo "###"
90 >        echo "### NOTE: Using internal demo database!"
91 >        echo "###"
92 >        echo
93 > endif
94 > #
95 > # Make sure we have a clear glazing definition
96 > #
97 > if (`rcalc -n -e 'ad(a,b)=if(a-b,a-b,b-a);$1=if('"ad($rg_r_arr[1],$rc_r_arr[1])+ad($rg_g_arr[1],$rc_g_arr[1])+ad($rg_b_arr[1],$rc_b_arr[1])-.005,1,0)"`) then
98 >        set sn_arr=("clear glass" $sn_arr:q)
99 >        set rg_r_arr=(0.074 $rg_r_arr)
100 >        set rg_g_arr=(0.077 $rg_g_arr)
101 >        set rg_b_arr=(0.079 $rg_b_arr)
102 >        set rc_r_arr=(0.074 $rc_r_arr)
103 >        set rc_g_arr=(0.077 $rc_g_arr)
104 >        set rc_b_arr=(0.079 $rc_b_arr)
105 >        set tn_r_arr=(0.862 $tn_r_arr)
106 >        set tn_g_arr=(0.890 $tn_g_arr)
107 >        set tn_b_arr=(0.886 $tn_b_arr)
108 >        set part_arr=(0 $part_arr)
109 > endif
110  
111   #################################################################
112   #
# Line 160 | Line 193 | echo "# Glazing produced by Radiance glaze script"
193   echo '# $Revision$'
194   if ($?gfiles) then
195          echo "# Loaded: $gfiles:q"
196 <        echo "# `date`"
196 >        echo -n "# " ; date
197   endif
198   echo "# Material surface normal points to interior"
199   echo "# Number of panes in system: $np"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines