| 1 |
greg |
1.1 |
{ SCCSid "$SunId$ LBL" } |
| 2 |
|
|
|
| 3 |
|
|
{ |
| 4 |
|
|
Coordinate computations for mkillum output. |
| 5 |
|
|
|
| 6 |
greg |
2.5 |
There are no arguments for the spherical case: |
| 7 |
greg |
1.1 |
|
| 8 |
|
|
il_alt - Altitude (1 to -1) for spherical coordinates |
| 9 |
|
|
il_azi - Azimuth (0 to 2*PI) for sphere |
| 10 |
|
|
|
| 11 |
greg |
2.5 |
For the hemispherical case, A1-A9 are the unit vectors for the |
| 12 |
greg |
1.1 |
hemisphere's coordinate system: |
| 13 |
|
|
|
| 14 |
|
|
il_alth - Altitude (1 to 0) for hemispherical coordinates |
| 15 |
|
|
il_azih - Azimuth (0 to 2*PI) for hemisphere |
| 16 |
|
|
} |
| 17 |
|
|
|
| 18 |
|
|
il_alt = Dz; |
| 19 |
|
|
il_azi = norm_rad(atan2(Dy, Dx)); |
| 20 |
|
|
|
| 21 |
greg |
2.5 |
il_alth = sq(-Dx*A7-Dy*A8-Dz*A9); |
| 22 |
|
|
il_azih = norm_rad(atan2(-Dx*A4-Dy*A5-Dz*A6, -Dx*A1-Dy*A2-Dz*A3)); |
| 23 |
greg |
1.1 |
|
| 24 |
greg |
2.5 |
norm_rad(r) = if( r, r, r+2*PI ); |