Evaluates a point sample of a Spherical Harmonic basis function.
tfg.math.spherical_harmonics.evaluate_spherical_harmonics( degree_l, order_m, theta, phi, name=None )
This function is implementating the algorithm and variable names described p. 12 of 'Spherical Harmonic Lighting: The Gritty Details.
In the following, A1 to An are optional batch dimensions.
degree_l: An integer tensor of shape
[A1, ..., An, C], where the last dimension represents the band of the spherical harmonics. Note that
degree_lmust be non-negative.
order_m: An integer tensor of shape
[A1, ..., An, C], where the last dimension represents the index of the spherical harmonics in the band
degree_l. Note that
0 <= order_m <= l.
theta: A tensor of shape
[A1, ..., An, 1]. This variable stores the polar angle of the sameple. Values of theta must be in [0, pi].
phi: A tensor of shape
[A1, ..., An, 1]. This variable stores the azimuthal angle of the sameple. Values of phi must be in [0, 2pi].
name: A name for this op. Defaults to 'spherical_harmonics_evaluate_spherical_harmonics'.
A tensor of shape
[A1, ..., An, C] containing the evaluation of each basis
of the spherical harmonics.
ValueError: if the shape of
phiis not supported.
InvalidArgumentError: if at least an element of
phiis outside the expected range.