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$
2
  • 1
    $\begingroup$ Hi. So which specific part of this are you having difficulty with? $\endgroup$ May 9, 2020 at 17:09
  • $\begingroup$ This question is rather vague for stackexchange standards. Check out creating objects and adding keyframes. $\endgroup$
    – Leander
    May 9, 2020 at 17:10

0

You must log in to answer this question.

Browse other questions tagged .