Meta.Numerics Library
SphericalHarmonic Method (l, m, theta, phi)
Meta.NumericsMeta.Numerics.FunctionsAdvancedMathSphericalHarmonic(Int32, Int32, Double, Double)
Computes the value of a spherical harmonic function.
Declaration Syntax
C#Visual BasicVisual C++F#
public static Complex SphericalHarmonic(
	int l,
	int m,
	double theta,
	double phi
)
Public Shared Function SphericalHarmonic ( _
	l As Integer, _
	m As Integer, _
	theta As Double, _
	phi As Double _
) As Complex
public:
static Complex SphericalHarmonic(
	int l, 
	int m, 
	double theta, 
	double phi
)
static member SphericalHarmonic : 
        l:int * 
        m:int * 
        theta:float * 
        phi:float -> Complex 
Parameters
l (Int32)
The order, which must be non-negative.
m (Int32)
The sub-order, which must lie between -l and l inclusive.
theta (Double)
The azimuthal angle θ. This angle is usually expressed as between -π/2 and +π/2, with positive values representing the upper hemisphere and negative values representing the lower hemisphere.
phi (Double)
The cylindrical angle φ. This angle is usually expressed as between 0 and 2π, measured counter-clockwise (as seen from above) from the positive x-axis. It is also possible to use negative values to represent clockwise movement.
Return Value
The value of Yl,m(θ,φ).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionl is negative, or m lies outside the range [-l, l].