Re: [Pdl-general] rotate matrix

2023-10-15 Thread Mark NanoNebulas
,[4178]) .=(($))-.2 ;
  $matrixc->range(45000,[4178]) .=(($))-.2 ;
  $colora->range(45000,[4178]) .= $r+$n ;
  $colorb->range(45000,[4178]) .= $g+$n ;
  $colorc->range(45000,[4178]) .= $b-$n ;

  $matrixa->range(5,[4178]) .=((-$))-.2 ;
  $matrixb->range(5,[4178]) .=((-$))-.2 ;
  $matrixc->range(5,[4178]) .=((-$))-.2 ;
  $colora->range(5,[4178]) .= $r+$n ;
  $colorb->range(5,[4178]) .= $g+$n ;
  $colorc->range(5,[4178]) .= $b-$n ;

  $matrixa->range(55000,[4178]) .=(($))-.2 ;
  $matrixb->range(55000,[4178]) .=(($))-.2 ;
  $matrixc->range(55000,[4178]) .=(($))-.2 ;
  $colora->range(55000,[4178]) .= $r+$n ;
  $colorb->range(55000,[4178]) .= $g-$n ;
  $colorc->range(55000,[4178]) .= $b+$n ;

  $matrixa->range(6,[4178]) .=((-$))-.2 ;
  $matrixb->range(6,[4178]) .=((-$))-.2 ;
 $matrixc->range(6,[4178]) .=((-$))-.2 ;
  $colora->range(6,[4178]) .= $r+$n ;
  $colorb->range(6,[4178]) .= $g-$n ;
  $colorc->range(6,[4178]) .= $b+$n ;
 #
  $matrixa->range(65000,[4178]) .=(($))-.2 ;
  $matrixb->range(65000,[4178]) .=(($))-.2 ;
  $matrixc->range(65000,[4178]) .=(($))-.2 ;
  $colora->range(65000,[4178]) .= $r-$n ;
  $colorb->range(65000,[4178]) .= $g+$n ;
  $colorc->range(65000,[4178]) .= $b-$n ;

  $matrixa->range(7,[4178]) .=((-$))-.2 ;
  $matrixb->range(7,[4178]) .=((-$))-.2 ;
  $matrixc->range(7,[4178]) .=((-$))-.2 ;
  $colora->range(7,[4178]) .= $r-$n ;
  $colorb->range(7,[4178]) .= $g+$n ;
  $colorc->range(7,[4178]) .= $b-$n ;


 #  $matrixa->range(75000,[4178]) .=.0009*($x)+(-.2) ;
 # $matrixb->range(75000,[4178]) .=.0009*($y)+(-.2) ;
 # $matrixc->range(75000,[4178]) .=.0009*($z)+(-.2) ;
 # $colora->range(75000,[4178]) .= $r ;
 # $colorb->range(75000,[4178]) .= $g ;
 # $colorc->range(75000,[4178]) .= $b ;





 # $matrixa=rotate($matrixa,$dd);
#$matrixb=rotate($matrixb,$dd);
#$matrixc=rotate($matrixc,$dd);



 +points3d[$matrixa+=$matrixa,$matrixb+=$matrixb,$matrixc+=$matrixc],
[$colora,$colorb,$colorc];#{PointSize=>1};


 }} #}


On Sun, Oct 15, 2023 at 9:15 PM Mark NanoNebulas 
wrote:

> 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 
> wrote:
>
>> the s orbital is x y z the p orbital is    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 
>> 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.001;
>>>  $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
>&g

Re: [Pdl-general] rotate matrix

2023-10-15 Thread Mark NanoNebulas
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 
wrote:

> the s orbital is x y z the p orbital is    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 
> 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.001;
>>  $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
>>
>> $ = $xx*cos($yy)*sin($zz);  ### cos   change the spin of the electron
>> here
>> $ = $xx*sin($yy)*sin($zz);  ### sin
>> $ = $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;
>>
>> #$=$*$vv;
>> #$=$*$vv;
>> #$=$*$vv;
>>
>>
>>
>>
>>  $matrixa = ones(100);
>>  $matrixb = ones(100);
>>  $matrixc = ones(100);
>>  $colora = ones(100);
>>  $colorb = ones(100);
>>  $colorc = ones(100);
>>
>>   $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(1,[4178]) .=0.8*((-$xxx))-.2 ;
>>   $matrixb->range(1,[4178]) .=0.8*((-$yyy))-.2 ;
>>   $matrixc->range(1,[4178]) .=0.8*((-$zzz))-.2 ;
>>   $colora->range(1,[4178]) .= $r ;
>>   $colorb->range(1,[4178]) .= $g ;
>>   $colorc->range(1,[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(2,[4178]) .=0.8*(($xxx))-.2 ;
>>   $matrixb->range(2,[4178]) .=0.8*((-$yyy))-.2 ;
>>   $matrixc->range(2,[4178]) .=0.8*(($zzz))-.2 ;
>>   $colora->range(2,[4178

Re: [Pdl-general] rotate matrix

2023-10-15 Thread Mark NanoNebulas
the s orbital is x y z the p orbital is    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 
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.001;
>  $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
>
> $ = $xx*cos($yy)*sin($zz);  ### cos   change the spin of the electron
> here
> $ = $xx*sin($yy)*sin($zz);  ### sin
> $ = $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;
>
> #$=$*$vv;
> #$=$*$vv;
> #$=$*$vv;
>
>
>
>
>  $matrixa = ones(100);
>  $matrixb = ones(100);
>  $matrixc = ones(100);
>  $colora = ones(100);
>  $colorb = ones(100);
>  $colorc = ones(100);
>
>   $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(1,[4178]) .=0.8*((-$xxx))-.2 ;
>   $matrixb->range(1,[4178]) .=0.8*((-$yyy))-.2 ;
>   $matrixc->range(1,[4178]) .=0.8*((-$zzz))-.2 ;
>   $colora->range(1,[4178]) .= $r ;
>   $colorb->range(1,[4178]) .= $g ;
>   $colorc->range(1,[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(2,[4178]) .=0.8*(($xxx))-.2 ;
>   $matrixb->range(2,[4178]) .=0.8*((-$yyy))-.2 ;
>   $matrixc->range(2,[4178]) .=0.8*(($zzz))-.2 ;
>   $colora->range(2,[4178]) .= $r ;
>   $colorb->range(2,[4178]) .= $g ;
>   $colorc->range(2,[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(3,[4178]) .=0.8*(($xxx))-.2 ;
>   $matrixb->range(3,[4178]) .=0.8*((-$yyy))-.2 ;
>   $matrixc->range(3,[4178]) .=0.8*((-$zzz))-.2 ;
>   $colora->range(3,[4178]) .= $r ;
>   $colorb->range(3,[4178]) .= $g ;
>   $colorc->range(3,[4178]) .= $b ;
>
>   $matrixa->range(35000,[4178]) .=0.8*(($xxx))-.2 ;
>   $matrixb->range(35000,[4178]) .=0.8*(($yyy))-.2 ;
>   $matrixc->range(3

Re: [Pdl-general] rotate matrix

2023-10-15 Thread Mark NanoNebulas
>range(5,[4178]) .= $r ;
  $colorb->range(5,[4178]) .= $g ;
  $colorc->range(5,[4178]) .= $b ;

  $matrixa->range(55000,[4178]) .=(($))-.2 ;
  $matrixb->range(55000,[4178]) .=(($))-.2 ;
  $matrixc->range(55000,[4178]) .=(($))-.2 ;
  $colora->range(55000,[4178]) .= $r ;
  $colorb->range(55000,[4178]) .= $g ;
  $colorc->range(55000,[4178]) .= $b ;

  $matrixa->range(6,[4178]) .=((-$))-.2 ;
  $matrixb->range(6,[4178]) .=((-$))-.2 ;
  $matrixc->range(6,[4178]) .=((-$))-.2 ;
  $colora->range(6,[4178]) .= $r ;
  $colorb->range(6,[4178]) .= $g ;
  $colorc->range(6,[4178]) .= $b ;
 #
  $matrixa->range(65000,[4178]) .=(($))-.2 ;
  $matrixb->range(65000,[4178]) .=(($))-.2 ;
  $matrixc->range(65000,[4178]) .=(($))-.2 ;
  $colora->range(65000,[4178]) .= $r ;
  $colorb->range(65000,[4178]) .= $g ;
  $colorc->range(65000,[4178]) .= $b ;

  $matrixa->range(7,[4178]) .=((-$))-.2 ;
  $matrixb->range(7,[4178]) .=((-$))-.2 ;
  $matrixc->range(7,[4178]) .=((-$))-.2 ;
  $colora->range(7,[4178]) .= $r ;
  $colorb->range(7,[4178]) .= $g ;
  $colorc->range(7,[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  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  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;
&

Re: [Pdl-general] rotate matrix

2023-10-14 Thread Mark NanoNebulas
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  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.001;
> >  $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


Re: [Pdl-general] rotate matrix

2023-10-13 Thread Mark NanoNebulas
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 
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.001;
>  $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


[Pdl-general] rotate matrix

2023-10-13 Thread Mark NanoNebulas
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.001;
 $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


Re: [Pdl-general] PDL CookBook

2023-10-07 Thread Mark NanoNebulas
I found a way to get a PDL in a Scalar; here is the first lesson in the PDL
cook book

-Mark Baker

On Sat, Oct 7, 2023 at 3:15 PM Mark NanoNebulas 
wrote:

> is there a way to get PDL to print a large matrix when the warnings says
> TOLARGETOPRINT...
>
> Cheers,
> -Mark Baker
>
>
> On Fri, Oct 6, 2023 at 12:36 AM Mark NanoNebulas 
> wrote:
>
>> Hi I have a lot of piddles and am wondering if we can get a bunch of them
>> together and make a CookBook for PDL you can send piddles to
>> Mark Baker at nanonebu...@gmail.com
>>
>> I think it would be the best book ever in programming, and would love all
>> of your help in making it ...
>>
>> Mark Baker
>>
>


chapter1_1.pl
Description: Perl program
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] PDL CookBook

2023-10-07 Thread Mark NanoNebulas
is there a way to get PDL to print a large matrix when the warnings says
TOLARGETOPRINT...

Cheers,
-Mark Baker


On Fri, Oct 6, 2023 at 12:36 AM Mark NanoNebulas 
wrote:

> Hi I have a lot of piddles and am wondering if we can get a bunch of them
> together and make a CookBook for PDL you can send piddles to
> Mark Baker at nanonebu...@gmail.com
>
> I think it would be the best book ever in programming, and would love all
> of your help in making it ...
>
> Mark Baker
>
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


[Pdl-general] PDL CookBook

2023-10-06 Thread Mark NanoNebulas
Hi I have a lot of piddles and am wondering if we can get a bunch of them
together and make a CookBook for PDL you can send piddles to
Mark Baker at nanonebu...@gmail.com

I think it would be the best book ever in programming, and would love all
of your help in making it ...

Mark Baker
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


[Pdl-general] getting bigint to work with PDL

2023-09-23 Thread Mark NanoNebulas
how can we get [use bigint] to work with PDL
or is there another function that can be used
example
$xx=sequence(10);
for(0..3000) { $xx*=2; p$xx; }

it goes to infinite
is there anyway to get around this
and get the real value

-Mark Baker
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] Trid demo

2023-07-28 Thread Mark NanoNebulas
I got cpanm PDL@2.082 to work(install) with all the Trid demos working
perfectly
Thanks Ed Thanks Zaki
can any one give me the right way to change the "points3d" Point size i
tried
{PointSize=>2}, {Point::Size=>2} sorry i cant remember how to do this ,can
anyone help ???

On Wed, Jul 26, 2023 at 2:40 PM Zakariyya Mughal 
wrote:

> On 2023-07-26 at 10:51:26 -0700, Mark NanoNebulas wrote:
> > Awesome, thanks for the info!
> > Ed do you know the last version of PDL with Trid in the demos ???
>
> PDL still has the TriD demos:
> <https://github.com/PDLPorters/pdl/tree/master/Demos>.
>
> Which OS and distribution are you using? We may be able to give
> step-by-step instructions on what you need to have installed.
>
> - Zaki Mughal
>
> >
> > On Wed, Jul 26, 2023 at 9:09 AM Ed .  wrote:
> >
> > > To install a version of PDL other than the latest, e.g. for 2.082:
> cpanm
> > > PDL@2.082
> > >
> > >
> > >
> > > The TriD modules and demo are still supplied, and should still work. If
> > > you can tell us what happens when you run “perl Makefile.PL” at the top
> > > level of the latest PDL, that would help. You’ll need not only OpenGL,
> but
> > > now also OpenGL::GLUT, for the POGL stuff to work.
> > >
> > >
> > >
> > > Best regards,
> > >
> > > Ed
> > >
> > >
> > >
> > > *From: *Mark NanoNebulas 
> > > *Sent: *26 July 2023 13:55
> > > *To: *pdl-general@lists.sourceforge.net
> > > *Subject: *[Pdl-general] Trid demo
> > >
> > >
> > >
> > > Hello I was wondering when you guys plan on putting the Trid demo back
> > >
> > > on the PDL install i mean i CANT USE Trid at all now, my OpenGL works
> > >
> > > i took a look at the install files and i cant even find the
> TRID::Graphics
> > > modules there any more, so if TRID is not going to be in PDL install no
> > > more can someone help me install a older version that still has Trid...
> > >
> > > can you even install a old version with CPAN, i tried and couldnt
> figure
> > > it out
> > >
> > > i tried to install version 2.008 where you
> > >
> > > perl Makefile.pl
> > >
> > > but thats where it failed and i was in the directory said something
> like
> > >
> > > it couldnt find "basic" something and quit installing
> > >
> > >
> > >
> > > so i mean i would really like to use PDL to program atoms and electrons
> > > and positrons... otherwise ill have to learn assembly on *KolibriOS* it
> > > has a PDL like
> > >
> > > demo that  doesn't use Trid or OpenGL its pure assembly language in a
> 3d
> > > graphics window but it seems to have the (with out color) same matrix
> 3D
> > > imaging as PDL, i found they might have programed the electron before
> me
> > > (maybe with out knowing) cause i found the same geometry as my electron
> > > here take a look
> > >
> > >
> > >
> > >  https://youtu.be/TKhokqmgFzI
> > >
> > >
> > >
> > > well cause I really like using PDL to make the OpenGL matrices and i
> like
> > > the idea
> > >
> > > of having simulation software where you can use atoms like legos and
> build
> > > molecules, but with Trid gone out of the demos that dream seems
> shattered
> > > at least with PDL without learning the ins and outs of POGL
> > >
> > >
> > >
> > > any help would be great...
> > >
> > >
> > >
> > > Cheers
> > >
> > >
> > >
> > > -Mark Nanonebulas
> > >
> > > on youtube
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
>
>
> > ___
> > 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
>
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


[Pdl-general] Thanks Ed

2023-07-26 Thread Mark NanoNebulas
Thank you Ed i used the cpanm PDL@2.082
and that installed PDL with the Trid demos
and i still got to keep the sound demo which I haven't worked with yet
and i was hoping to get to know it well...

Thanks again

-Mark Nanonebulas
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


Re: [Pdl-general] Trid demo

2023-07-26 Thread Mark NanoNebulas
Awesome, thanks for the info!
Ed do you know the last version of PDL with Trid in the demos ???

On Wed, Jul 26, 2023 at 9:09 AM Ed .  wrote:

> To install a version of PDL other than the latest, e.g. for 2.082: cpanm
> PDL@2.082
>
>
>
> The TriD modules and demo are still supplied, and should still work. If
> you can tell us what happens when you run “perl Makefile.PL” at the top
> level of the latest PDL, that would help. You’ll need not only OpenGL, but
> now also OpenGL::GLUT, for the POGL stuff to work.
>
>
>
> Best regards,
>
> Ed
>
>
>
> *From: *Mark NanoNebulas 
> *Sent: *26 July 2023 13:55
> *To: *pdl-general@lists.sourceforge.net
> *Subject: *[Pdl-general] Trid demo
>
>
>
> Hello I was wondering when you guys plan on putting the Trid demo back
>
> on the PDL install i mean i CANT USE Trid at all now, my OpenGL works
>
> i took a look at the install files and i cant even find the TRID::Graphics
> modules there any more, so if TRID is not going to be in PDL install no
> more can someone help me install a older version that still has Trid...
>
> can you even install a old version with CPAN, i tried and couldnt figure
> it out
>
> i tried to install version 2.008 where you
>
> perl Makefile.pl
>
> but thats where it failed and i was in the directory said something like
>
> it couldnt find "basic" something and quit installing
>
>
>
> so i mean i would really like to use PDL to program atoms and electrons
> and positrons... otherwise ill have to learn assembly on *KolibriOS* it
> has a PDL like
>
> demo that  doesn't use Trid or OpenGL its pure assembly language in a 3d
> graphics window but it seems to have the (with out color) same matrix 3D
> imaging as PDL, i found they might have programed the electron before me
> (maybe with out knowing) cause i found the same geometry as my electron
> here take a look
>
>
>
>  https://youtu.be/TKhokqmgFzI
>
>
>
> well cause I really like using PDL to make the OpenGL matrices and i like
> the idea
>
> of having simulation software where you can use atoms like legos and build
> molecules, but with Trid gone out of the demos that dream seems shattered
> at least with PDL without learning the ins and outs of POGL
>
>
>
> any help would be great...
>
>
>
> Cheers
>
>
>
> -Mark Nanonebulas
>
> on youtube
>
>
>
>
>
>
>
>
>
>
>
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general


[Pdl-general] Trid demo

2023-07-26 Thread Mark NanoNebulas
Hello I was wondering when you guys plan on putting the Trid demo back
on the PDL install i mean i CANT USE Trid at all now, my OpenGL works
i took a look at the install files and i cant even find the TRID::Graphics
modules there any more, so if TRID is not going to be in PDL install no
more can someone help me install a older version that still has Trid...
can you even install a old version with CPAN, i tried and couldnt figure it
out
i tried to install version 2.008 where you
perl Makefile.pl
but thats where it failed and i was in the directory said something like
it couldnt find "basic" something and quit installing

so i mean i would really like to use PDL to program atoms and electrons and
positrons... otherwise ill have to learn assembly on *KolibriOS* it has a
PDL like
demo that  doesn't use Trid or OpenGL its pure assembly language in a 3d
graphics window but it seems to have the (with out color) same matrix 3D
imaging as PDL, i found they might have programed the electron before me
(maybe with out knowing) cause i found the same geometry as my electron
here take a look

 https://youtu.be/TKhokqmgFzI

well cause I really like using PDL to make the OpenGL matrices and i like
the idea
of having simulation software where you can use atoms like legos and build
molecules, but with Trid gone out of the demos that dream seems shattered
at least with PDL without learning the ins and outs of POGL

any help would be great...

Cheers

-Mark Nanonebulas
on youtube
___
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general