0
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ Hi. So which specific part of this are you having difficulty with? $\endgroup$ – Ray Mairlot May 9 at 17:09
  • $\begingroup$ This question is rather vague for stackexchange standards. Check out creating objects and adding keyframes. $\endgroup$ – Leander May 9 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.