0

I want to create a 3D Animation of a hydrogen orbital using the mesh.math addon. Therefore I wrote a short python code.

#Repositorys
from scipy.special import sph_harm
import cmath

#Variables
l = 1
m = 0
#v and u mesh variables (v from 0 to 2*pi and u from 0 to pi)


#Variables for linear combination
l2 = 2
m2 = 0
t = 0 

#Calculate linear combination
x = abs(sph_harm(m, l, v, u)  + sph_harm(m2, l2, v, u) * cmath.exp(-t*1j))  * np.outer(np.cos(phi), np.sin(theta))
y = abs(sph_harm(m, l, v, u)  + sph_harm(m2, l2, v, u) * cmath.exp(-t*1j)) * np.outer(np.sin(phi), np.sin(theta))
z = abs(sph_harm(m, l, v, u)  + sph_harm(m2, l2, v, u) * cmath.exp(-t*1j)) * np.outer(np.ones(np.size(phi)), np.cos(theta))

Now I want this to create a plot. And even an animation by changing t from 0 to 2*pi. To be honest I have no idea how Blender works so I would really appreciate your support.

0 Answers0