Visualizing Spherical Harmonics In Python
I am trying to draw a spherical harmonics for my college project. The following formula I want to depict, Y = cos(theta) for that, I wrote this code import numpy as np from mpl_to
Solution 1:
The Y you are passing to the function needs to be an absolute value to make it r, else z = cos(theta)^2 is always positive. If r is to be the radius then this what you should be doing.
x, y, z = sph2cart(np.abs(Y), phi, tta)
Post a Comment for "Visualizing Spherical Harmonics In Python"