I some what found an answer i had to change the geometry to get an orb in the center position which i found to be
$xxx = $xx*cos($yy)*sin($zz)+sin($xx); ### $yyy = $xx*sin($yy)*sin($zz)+sin($xx); ### $zzz = $xx*cos($zz); which all together gives 14 orbs 8 with +sin($xx) and 6 regular but the orbitals go 2 8 18 32 .... so the 8 is really 4 orbitals 2 electrons to each orb which makes the code only good for the s and p orbitals so would just using spheres be better .... $Cheers -Mark Baker On Fri, Oct 13, 2023 at 10:36 AM Mark NanoNebulas <nanonebu...@gmail.com> wrote: > Hi im trying to rotate this obital so that i can place them all over in > balanced arrangements of orbs like the chemistry book says but i dont know > how to rotate a matrix in all directions, can anybody help > heres the code > > ################################################## > use PDL; > use PDL::Complex; > use PDL::Graphics::TriD; > use PDL::Math; keeptwiddling3d; > $PDL::BIGPDL=1; > ## remember this can crash the computer if you dont have enough RAM and > swap in linux or pagefile in windows > > > > for (;;){ > $c = (400) ; ## speed > for $phase(-360..360) { ## 360 > $phases = $phase*0.0000001; > $frequency = ($c**-1); > $n= (6.28*$c*$frequency+($phases)); > > $photons = 4178; ### [Density] 2444 4178 > > > $t=rvals(exp(zeros($photons))); > $cz=-1**$t*$c; # -1**$t*$c > $cy=-1**sin($t*$c); #-1**$c*sin($t*$c) > $cx=-1**$c*sin(rvals($t))*$c; #-1**$c*bessj0(rvals($t,{Centre=>[0]}))*$c; > > > $w=$cz-$cy-$cx; > $g=sin($w); #sin > $r=cos($cy+$c+$cz); #cos > $b=cos($w); #cos > $i=($cz-$cx-$cy); > $q=$c*($i*$n); > $xx = $b*sin($b); ### > $yy = $r*($q); ### > $zz = $g*cos($g); ### > > $xxx = $xx*cos($yy)*sin($zz); ### > $yyy = $xx*sin($yy)*sin($zz); ### > $zzz = $xx*cos($zz); > > points3d[$xxx,$yyy,$zzz],[$r,$g,$b]; > > ########################################################## > > if i can get this orbital to rotate in all directions, then i can > represent atoms > better cause they are balanced by the number of electrons so the orbs > repeal each other, please any help would be appreciated !!! > > Best, > -Mark Baker > > > > >
_______________________________________________ pdl-general mailing list pdl-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-general