Learn R Programming

boostmath (version 1.0.0)

spherical_harmonics: Spherical Harmonics

Description

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.

Arguments

n

Degree of the spherical harmonic

m

Order of the spherical harmonic

theta

Polar angle (colatitude)

phi

Azimuthal angle (longitude)

See Also

Examples

Run this code
# Spherical harmonic function Y_2^1(0.5, 0.5)
spherical_harmonic(2, 1, 0.5, 0.5)
# Real part of the spherical harmonic function Y_2^1(0.5, 0.5)
spherical_harmonic_r(2, 1, 0.5, 0.5)
# Imaginary part of the spherical harmonic function Y_2^1(0.5, 0.5)
spherical_harmonic_i(2, 1, 0.5, 0.5)

Run the code above in your browser using DataLab