/usr/share/radiance/gauss.cal is in radiance-materials 4R1+20120125-1.
This file is owned by root:root, with mode 0o644.
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 101 102 103 104 | {
Gaussian Integration
10/20/87
order - order of integral (# of sample points)
xmin - interval begin
xmax - interval end
f(x) - integrand
integ - integral value
}
{ Defaults }
order = 24 ;
xmin = -1 ;
xmax = 1 ;
integ = q1(ceil(order/2-.25)) * (xmax-xmin)/2 ;
q1(i) = if( i-1.5, wght(i)*(f1(absc(i))+f1(-absc(i))) + q1(i-1),
wght(1)*(f1(absc(1))+if(even,f1(-absc(1)),0)) ) ;
even = floor(order/2+.25) - order/2 + .25 ;
f1(u) = f((xmax*(1+u)+xmin*(1-u))/2) ;
{ Abscissas }
absc(i) = select( order,
0,
.577350269189626, { n = 2 }
select( i, { n = 3 }
0,
.774596669241483
),
0, 0,
select( i, { n = 6 }
.238619186083197,
.661209386466265,
.932469514203152
),
0, 0, 0, 0, 0,
select( i, { n = 12 }
.125233408511469,
.367831498998180,
.587317954286617,
.769902674194305,
.904117256370475,
.981560634246719
),
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
select( i, { n = 24 }
.064056892862606,
.191118867473616,
.315042679696163,
.433793507626045,
.545421471388840,
.648093651936976,
.740124191578554,
.820001985973903,
.886415527004401,
.938274552002733,
.974728555971309,
.995187219997021
)
) ;
{ Weights }
wght(i) = select( order,
0,
1, { n = 2 }
select( i, { n = 3 }
.888888888888888,
.555555555555555
),
0, 0,
select( i, { n = 6 }
.467913934572691,
.360761573048139,
.171324492379170
),
0, 0, 0, 0, 0,
select( i, { n = 12 }
.249147045813403,
.233492536538355,
.203167426723066,
.160078328543346,
.106939325995318,
.047175336386512
),
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
select( i, { n = 24 }
.127938195346752,
.125837456346828,
.121670472927803,
.115505668053726,
.107444270115966,
.097618652104114,
.086190161531953,
.073346481411080,
.059298584915437,
.044277438817420,
.028531388628934,
.012341229799987
)
) ;
|