tfg.math.spherical_harmonics.evaluate_spherical_harmonics
Stay organized with collections
Save and categorize content based on your preferences.
Evaluates a point sample of a Spherical Harmonic basis function.
tfg.math.spherical_harmonics.evaluate_spherical_harmonics(
degree_l: TensorLike,
order_m: TensorLike,
theta: TensorLike,
phi: TensorLike,
name: str = 'spherical_harmonics_evaluate_spherical_harmonics'
) -> TensorLike
Note |
This function is implementating the algorithm and variable names described
p. 12 of 'Spherical Harmonic Lighting: The Gritty Details.
|
Note |
In the following, A1 to An are optional batch dimensions.
|
Args |
degree_l
|
An integer tensor of shape [A1, ..., An, C] , where the last
dimension represents the band of the spherical harmonics. Note that
degree_l must 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 order_m must satisfy 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".
|
Returns |
A tensor of shape [A1, ..., An, C] containing the evaluation of each basis
of the spherical harmonics.
|
Raises |
ValueError
|
if the shape of theta or phi is not supported.
|
InvalidArgumentError
|
if at least an element of l , m , theta or phi
is outside the expected range.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-10-28 UTC."],[],[]]