5 |
|
Greg Ward June 2009 |
6 |
|
|
7 |
|
Based on tregsrc.cal |
8 |
< |
MF controls patch density |
8 |
> |
MF constant controls patch density, and should be assigned in advance |
9 |
|
|
10 |
< |
Input is Rbin from 1-(144*MF+1) and optional x1 x2 random variables |
10 |
> |
Input is Rbin from 1-(144*MF^2+1) and optional x1 x2 random variables |
11 |
|
Output is Dx Dy Dz theta (degree full angle of source) |
12 |
|
} |
13 |
|
DEGREE : PI/180; |
14 |
|
|
15 |
|
x1 = .5; x2 = .5; { default rand. var. settings for midpoint } |
16 |
|
|
17 |
– |
MF : 2^2; { Multiplication factor } |
17 |
|
alpha : 90/(MF*7 + .5); { Separation between rows in degrees } |
18 |
|
{ Number of patches per row } |
19 |
|
tnaz(r) : select(r, 30, 30, 24, 24, 18, 12, 6); |
44 |
|
|
45 |
|
Dx = sin(Razi)*cos_ralt; |
46 |
|
Dy = cos(Razi)*cos_ralt; |
47 |
< |
Dz = sin(Ralt); |
47 |
> |
Dz = sqrt(1 - cos_ralt*cos_ralt); |
48 |
|
|
49 |
|
theta = 2/DEGREE * acos(1 - Romega/(2*PI)); |