i found the torus matrix here $xxx = $xx*sin($yy)*cos($zz); $yyy = $xx*cos($yy)*cos($zz); $zzz = $xx*sin($zz);
and if you add the $xx to $xxx and $yyy you get bigger orbs like $xxx = $xx*sin($yy)*cos($zz)+$xx; $yyy = $xx*cos($yy)*cos($zz)+$xx; $zzz = $xx*sin($zz); would that be all the orbitals i need ??? Best, -Mark Baker On Sun, Oct 15, 2023 at 5:46 PM Mark NanoNebulas <nanonebu...@gmail.com> wrote: > the s orbital is x y z the p orbital is xxxx yyyy zzzz the d orbitals are > xxx yyy zzz > is that right and can they be used to describe all atoms ??? > > -Mark Baker > > On Sun, Oct 15, 2023 at 5:26 PM Mark NanoNebulas <nanonebu...@gmail.com> > wrote: > >> have you used the range function ??? here i have all orbitals that can >> be without using hold3d(); >> >> could you put the Rotxz into 4178 dimensions I dont understand how your >> doing it in 3 >> here are all the orbitals i got 14 of them total in your opinion can i >> use these to describe all the atoms >> >> check out the range function it lets you use a lot of piddles in one >> matrix... >> >> Best, >> -Mark >> ##################### >> >> use PDL; >> use PDL::Complex; >> use PDL::Graphics::TriD; >> use PDL::NiceSlice; >> 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 = (4000) ; ## 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); >> >> ### altitude longitude latitude >> $x = $b*sin($q); ### cos change the spin of the electron here >> $y = $r*cos($q); ### sin >> $z = $g*sin($q); ### cos >> >> >> $xx = $b*sin($b); ### cos change the spin of the electron here >> $yy = $r*($q); ### sin >> $zz = $g*cos($g); ### cos >> $dd++; >> $xxx = $xx*cos($yy)*sin($zz)+sin($xx*(1/sqrt 2)); ### cos change the >> spin of the electron here >> $yyy = $xx*sin($yy)*sin($zz)+sin($xx*(1/sqrt 2)); ### sin >> $zzz = $xx*cos($zz); ### cos >> # Draw a line >> >> $xxxx = $xx*cos($yy)*sin($zz); ### cos change the spin of the electron >> here >> $yyyy = $xx*sin($yy)*sin($zz); ### sin >> $zzzz = $xx*cos($zz); >> >> >> >> $vv=sequence(4178); >> ### wavefunction #exp(-sqrt(($x**2)+($y**2)+($z**2))) >> >> #$xxx=rotate($xxx,$phase); >> #$yyy=rotate($yyy,$phase); >> #$zzz=rotate($zzz,$phase); >> >> #$xxx=$xxx*$vv; >> #$yyy=$yyy*$vv; >> #$zzz=$zzz*$vv; >> >> #$xxxx=$xxxx*$vv; >> #$yyyy=$yyyy*$vv; >> #$zzzz=$zzzz*$vv; >> >> >> >> >> $matrixa = ones(1000000); >> $matrixb = ones(1000000); >> $matrixc = ones(1000000); >> $colora = ones(1000000); >> $colorb = ones(1000000); >> $colorc = ones(1000000); >> >> $matrixa->range(5000,[4178]) .=0.8*(($xxx))-.2 ; >> $matrixb->range(5000,[4178]) .=0.8*(($yyy))-.2 ; >> $matrixc->range(5000,[4178]) .=0.8*(($zzz))-.2 ; >> $colora->range(5000,[4178]) .= $r ; >> $colorb->range(5000,[4178]) .= $g ; >> $colorc->range(5000,[4178]) .= $b ; >> >> $matrixa->range(10000,[4178]) .=0.8*((-$xxx))-.2 ; >> $matrixb->range(10000,[4178]) .=0.8*((-$yyy))-.2 ; >> $matrixc->range(10000,[4178]) .=0.8*((-$zzz))-.2 ; >> $colora->range(10000,[4178]) .= $r ; >> $colorb->range(10000,[4178]) .= $g ; >> $colorc->range(10000,[4178]) .= $b ; >> >> $matrixa->range(15000,[4178]) .=0.8*((-$xxx))-.2 ; >> $matrixb->range(15000,[4178]) .=0.8*((-$yyy))-.2 ; >> $matrixc->range(15000,[4178]) .=0.8*(($zzz))-.2 ; >> $colora->range(15000,[4178]) .= $r ; >> $colorb->range(15000,[4178]) .= $g ; >> $colorc->range(15000,[4178]) .= $b ; >> >> $matrixa->range(20000,[4178]) .=0.8*(($xxx))-.2 ; >> $matrixb->range(20000,[4178]) .=0.8*((-$yyy))-.2 ; >> $matrixc->range(20000,[4178]) .=0.8*(($zzz))-.2 ; >> $colora->range(20000,[4178]) .= $r ; >> $colorb->range(20000,[4178]) .= $g ; >> $colorc->range(20000,[4178]) .= $b ; >> >> $matrixa->range(25000,[4178]) .=0.8*((-$xxx))-.2 ; >> $matrixb->range(25000,[4178]) .=0.8*(($yyy))-.2 ; >> $matrixc->range(25000,[4178]) .=0.8*((-$zzz))-.2 ; >> $colora->range(25000,[4178]) .= $r ; >> $colorb->range(25000,[4178]) .= $g ; >> $colorc->range(25000,[4178]) .= $b ; >> >> $matrixa->range(30000,[4178]) .=0.8*(($xxx))-.2 ; >> $matrixb->range(30000,[4178]) .=0.8*((-$yyy))-.2 ; >> $matrixc->range(30000,[4178]) .=0.8*((-$zzz))-.2 ; >> $colora->range(30000,[4178]) .= $r ; >> $colorb->range(30000,[4178]) .= $g ; >> $colorc->range(30000,[4178]) .= $b ; >> >> $matrixa->range(35000,[4178]) .=0.8*(($xxx))-.2 ; >> $matrixb->range(35000,[4178]) .=0.8*(($yyy))-.2 ; >> $matrixc->range(35000,[4178]) .=0.8*((-$zzz))-.2 ; >> $colora->range(35000,[4178]) .= $r ; >> $colorb->range(35000,[4178]) .= $g ; >> $colorc->range(35000,[4178]) .= $b ; >> >> $matrixa->range(40000,[4178]) .=0.8*((-$xxx))-.2 ; >> $matrixb->range(40000,[4178]) .=0.8*(($yyy))-.2 ; >> $matrixc->range(40000,[4178]) .=0.8*(($zzz))-.2 ; >> $colora->range(40000,[4178]) .= $r ; >> $colorb->range(40000,[4178]) .= $g ; >> $colorc->range(40000,[4178]) .= $b ; >> >> $matrixa->range(45000,[4178]) .=(($xxxx))-.2 ; >> $matrixb->range(45000,[4178]) .=(($yyyy))-.2 ; >> $matrixc->range(45000,[4178]) .=(($zzzz))-.2 ; >> $colora->range(45000,[4178]) .= $r ; >> $colorb->range(45000,[4178]) .= $g ; >> $colorc->range(45000,[4178]) .= $b ; >> >> $matrixa->range(50000,[4178]) .=((-$xxxx))-.2 ; >> $matrixb->range(50000,[4178]) .=((-$yyyy))-.2 ; >> $matrixc->range(50000,[4178]) .=((-$zzzz))-.2 ; >> $colora->range(50000,[4178]) .= $r ; >> $colorb->range(50000,[4178]) .= $g ; >> $colorc->range(50000,[4178]) .= $b ; >> >> $matrixa->range(55000,[4178]) .=(($zzzz))-.2 ; >> $matrixb->range(55000,[4178]) .=(($xxxx))-.2 ; >> $matrixc->range(55000,[4178]) .=(($yyyy))-.2 ; >> $colora->range(55000,[4178]) .= $r ; >> $colorb->range(55000,[4178]) .= $g ; >> $colorc->range(55000,[4178]) .= $b ; >> >> $matrixa->range(60000,[4178]) .=((-$zzzz))-.2 ; >> $matrixb->range(60000,[4178]) .=((-$xxxx))-.2 ; >> $matrixc->range(60000,[4178]) .=((-$yyyy))-.2 ; >> $colora->range(60000,[4178]) .= $r ; >> $colorb->range(60000,[4178]) .= $g ; >> $colorc->range(60000,[4178]) .= $b ; >> # >> $matrixa->range(65000,[4178]) .=(($yyyy))-.2 ; >> $matrixb->range(65000,[4178]) .=(($zzzz))-.2 ; >> $matrixc->range(65000,[4178]) .=(($xxxx))-.2 ; >> $colora->range(65000,[4178]) .= $r ; >> $colorb->range(65000,[4178]) .= $g ; >> $colorc->range(65000,[4178]) .= $b ; >> >> $matrixa->range(70000,[4178]) .=((-$yyyy))-.2 ; >> $matrixb->range(70000,[4178]) .=((-$zzzz))-.2 ; >> $matrixc->range(70000,[4178]) .=((-$xxxx))-.2 ; >> $colora->range(70000,[4178]) .= $r ; >> $colorb->range(70000,[4178]) .= $g ; >> $colorc->range(70000,[4178]) .= $b ; >> >> # $matrixa=rotate($matrixa,$dd); >> #$matrixb=rotate($matrixb,$dd); >> #$matrixc=rotate($matrixc,$dd); >> >> >> >> +points3d[$matrixa,$matrixb,$matrixc], >> [$colora,$colorb,$colorc];#{PointSize=>1}; >> >> >> }} #} >> >> >> >> On Sat, Oct 14, 2023 at 10:05 PM Luis Mochan <moc...@icf.unam.mx> wrote: >> >>> 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; >>> use PDL::Graphics::TriD; >>> use PDL::Math; >>> my $c = 10; ## speed >>> my $Rotxz=pdl([[1/sqrt 2, 0, -1/sqrt 2],[0,1,0], [1/sqrt 2, 0, 1/sqrt >>> 2]]); >>> nokeeptwiddling3d; >>> while(1){ >>> for my $phase(-360..360) { ## 360 >>> my $photons = 4178; ### [Density] 2444 4178 >>> my $t=rvals(zeros($photons)); >>> my $cz=$c; # -1**$t*$c >>> my $cy=sin($t*$c); >>> my $cx=sin($t)*$c; >>> my $w=$cz-$cy-$cx; >>> my $color=(pdl[my $r=cos($cy+$c+$cz), my $g=sin($w), my >>> $b=cos($w)])->mv(-1,0); >>> my $i=($cz-$cx-$cy); >>> my $q=$c*($i*$phase); >>> my $R = $b*sin($b); >>> my $phi = $r*$q; >>> my $theta = $g*cos($g); >>> my $points=($R*pdl[sin($theta)*cos($phi), >>> sin($phi)*sin($theta),cos($theta)]); >>> my $allpoints=pdl( >>> $Rotxz x $points, $Rotxz->transpose x $points, -$Rotxz x >>> $points, -$Rotxz->transpose x $points >>> )->mv(1,0); >>> points3d(pdl[[1,1,1],[-1,-1,-1]]); >>> hold3d(); >>> points3d($allpoints, $color->dummy(2)); >>> release3d(); >>> } >>> } >>> >>> >>> On Sat, Oct 14, 2023 at 06:01:34PM -0700, Mark NanoNebulas wrote: >>> > 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 ??? >>> > >>> > -Mark Baker >>> > >>> > >>> > On Sat, Oct 14, 2023 at 7:18 AM Luis Mochan <moc...@icf.unam.mx> >>> wrote: >>> > >>> > > 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 to rotate the symmetry axis from the z direction >>> to an >>> > > arbitrary direction? You could apply a 3x3 rotation matrix to the >>> > > $points array in the code below. If you want a point to remain fixed, >>> > > first translate it to the origin, the rotate, and then rotate back. >>> > > Regards, >>> > > Luis >>> > > ---------------- >>> > > ################################################## >>> > > use PDL; >>> > > use PDL::Complex; >>> > > use PDL::Graphics::TriD; >>> > > use PDL::Math; >>> > > nokeeptwiddling3d; >>> > > my $c = 10; ## speed >>> > > while(1){ >>> > > for my $phase(-360..360) { ## 360 >>> > > my $photons = 4178; ### [Density] 2444 4178 >>> > > my $t=rvals(zeros($photons)); >>> > > my $cz=$c; # -1**$t*$c >>> > > my $cy=sin($t*$c); >>> > > my $cx=sin($t)*$c; >>> > > my $w=$cz-$cy-$cx; >>> > > my $color=(pdl[my $r=cos($cy+$c+$cz), my $g=sin($w), my >>> > > $b=cos($w)])->mv(-1,0); >>> > > my $i=($cz-$cx-$cy); >>> > > my $q=$c*($i*$phase); >>> > > my $R = $b*sin($b); >>> > > my $phi = $r*$q; >>> > > my $theta = $g*cos($g); >>> > > my $points=($R*pdl[sin($theta)*cos($phi), >>> > > sin($phi)*sin($theta),cos($theta)])->mv(-1,0); >>> > > points3d $points,$color; >>> > > } >>> > > } >>> > > >>> > > >>> > > >>> > > On Fri, Oct 13, 2023 at 10:36:17AM -0700, Mark NanoNebulas 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 >>> > > >>> > > >>> > > -- >>> > > >>> > > o >>> > > W. Luis Mochán, | tel:(52)(777)329-1734 >>> /<(*) >>> > > Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 >>> `>/ /\ >>> > > Av. Universidad s/n CP 62210 | >>> (*)/\/ \ >>> > > Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ >>> > > GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB >>> > > >>> > > >>> > > _______________________________________________ >>> > > pdl-general mailing list >>> > > pdl-general@lists.sourceforge.net >>> > > https://lists.sourceforge.net/lists/listinfo/pdl-general >>> > > >>> >>> >>> > _______________________________________________ >>> > pdl-general mailing list >>> > pdl-general@lists.sourceforge.net >>> > https://lists.sourceforge.net/lists/listinfo/pdl-general >>> >>> >>> -- >>> >>> o >>> W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) >>> Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ >>> Av. Universidad s/n CP 62210 | (*)/\/ >>> \ >>> Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ >>> GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB >>> >>
_______________________________________________ pdl-general mailing list pdl-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-general