Functions to compute spherical harmonics and related functions.
Usage
spherical_harmonic(n, m, theta, phi)
spherical_harmonic_r(n, m, theta, phi)
spherical_harmonic_i(n, m, theta, phi)
Value
A single complex value with the computed spherical harmonic function, or its real and imaginary parts.
Examples
# Spherical harmonic function Y_2^1(0.5, 0.5)
spherical_harmonic(2, 1, 0.5, 0.5)
#> [1] -0.2852481-0.1558318i
# Real part of the spherical harmonic function Y_2^1(0.5, 0.5)
spherical_harmonic_r(2, 1, 0.5, 0.5)
#> [1] -0.2852481
# Imaginary part of the spherical harmonic function Y_2^1(0.5, 0.5)
spherical_harmonic_i(2, 1, 0.5, 0.5)
#> [1] -0.1558318