Hi,
I didn't quite understand the code. I simplified it a bit, removed
many noop instructions, changed the speed, negated the twiddling and
the result looks like a nice lobe of a p orbital, made up of points
along some spiral, rotating about its axis. Is this the rotation you
want or do you want
This worked for me to generate x-z d orbitals. The other planes are similar.
I simply applied 4 different 45 degree rotations to your points and
plotted them all together. I added two additional points to fix the scale.
##
use PDL;
use PDL::Complex;
i found out how to move the point in the y axis here
$dd++;
$xxx = $xx*cos($yy)*sin($zz)+sin($xx); ### cos change the spin of the
electron here
$yyy = $xx*sin($yy)*sin($zz)+sin($xx+$dd); ### sin
$zzz = $xx*cos($zz); ### cos
this seems to work but can it make all the d orbitals i need ???