|
|
◆ Sharmonic()
| Function Sharmonic |
( |
L As |
Long, |
|
|
M As |
Long, |
|
|
Theta As |
Double, |
|
|
Phi As |
Double, |
|
|
Optional Info As |
Long |
|
) |
| |
Spherical harmonic Ylm(θ, φ)
- Purpose
- This routine computes the spherical harmonic of degree l, order m, polar angle θ and azimuth φ.
Ylm(θ, φ) = [(2l + 1)/4π (l - m)!/(l + m)!]^(1/2) Plm(cosθ)exp(imφ), where m <= l.
Plm(x) is an associated Legendre polynomial. Note that the phase factor of (-1)^m is included in Plm(x).
- Returns
- Complex
Spherical harmonic Ylm(θ, φ).
- Parameters
-
| [in] | L | Argument l. (0 <= L < 128) |
| [in] | M | Argument m. (|M| <= L) |
| [in] | Theta | Argument θ.
Keep theta in the range [0, π]. For theta outside this range, the function value may be different from the other implementation. |
| [in] | Phi | Argument φ.
Keep phi in the range [0, 2π]. For phi outside this range, the function value may be different from the other implementation. |
| [out] | Info | (Optional)
= 0: Successful exit.
= -1: The argument L had an illegal value. (L < 0, L >= 128)
= -2: The argument M had an illegal value. (|M| > L)
= 1: Floating point range error. |
- Reference
- boost/math/special_functions
|