Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Theory => Topic started by: cKleinhuis on October 23, 2010, 12:44:21 AM




Title: Overcome Singularity
Post by: cKleinhuis on October 23, 2010, 12:44:21 AM
hi all, i am playing with maple at the university, and i have an idea, i was experimenting with defining the triplex algebra
through arbitrary axes, because this is essentially what the difference between various formula variants is, it was an experiment
on defining three base vectors which define the coordinate system ( left hand, right hand, arbitrary ) this was just for me experimenting
with the program and entering formulas, but i saw something ( which i could also have seen by using standard x,y,z rotation matrices, for sure ;) )
the point that swizzles me is that any combination of 2 rotation matrices leaves out an singularity in the matrix, namely there is one element
in the matrix that is 0

the idea now is to incorporate 3 rotation matrices into the operation, i know this sounds strange, because a point is defined explicit by
only 2 angles, but why not apply the following algorithm to the multiplication:

1. take a point <x,y,z>
2. calculate angles to ANY axis defined, so, xa,ya,za are standing for the actual angles to each axis defined by the vector
3. the multiplication would then go like:
          3.1 Multiply Lengths of vectors as usual
          3.2 Add the angles of all three values, xa,ya,za, from both input vectors
          3.3 create rotation matrix from all three angles
4. multiply vector <length1*length2,0,0> with rotation matrix

et voila


as described above, i had a reason for this method, and the reason is the singularity implied through the 0 in the transformation matrix

first attachment below is the rotation matrix for all 3 axes, in the order of: X,Y,Z , alpha beta and gamma are the angles
second attachment below is the rotation matrix for all 3 axes, in the order of: Z,Y,X , alpha beta and gamma are the angles
 
so, for containing the complex plane the rotation order must be in that way, that <0,1,0>^2 yields: <-1,0,0>
wich would be a rotation around X Axis by 90 Degree ( up or down ) and an Rotation around Y Axis by 90 Degrees ( up or down ) to land on the point <-1,0,0>
i have not thought about embedding the complex plane, but this should be doable, when thinking of the desired property that <0,1,0>^2 ( complex: (0+1i )) results in <-1,0,0>
but keeping in mind that 3 rotations are done to reach that point :D, perhaps the angles have to be shifted for that single purpose that <0,1,0>^2=-1

would be cool if someone could include the method in their rendering process :D

 O0


Title: Re: Overcome Singularity
Post by: Paolo Bonzini on October 23, 2010, 12:54:01 AM
Hmm, wouldn't you get gimbal lock in this case?


Title: Re: Overcome Singularity
Post by: cKleinhuis on October 23, 2010, 12:58:50 AM
it is just a thought, perhaps the gimbal lock would be useful, that the 3 axis method would degenerate to complex math if in the plane ;)

but it is just an idea, because the matrix looked to me as if it would miss something...


Title: Re: Overcome Singularity
Post by: Jesse on October 24, 2010, 07:00:10 PM
hi trifox,

some results i got so far, but i miss something for my understanding:
if i perform rotations on the axis in a row and start in the xy-plane with z=0,
why i did not get the original Mset in that plane?
Shouldnt it so because doubling the angle 0 does not lead to a rotation in the z dimension at all?

And i got a different result when doing the rotations in a row (last pic) instead using your
combined rotation matrices.

The code i used for your XYZ matrix:
Code:
      R := 1 / Sqrt(Rout);
      x := x * R;            //normalize vector
      y := y * R;
      z := z * R;   

      xa := ArcTan2(z, y);
      ya := ArcTan2(z, x);
      za := ArcTan2(y, x);
      SinCosD(xa * 2, Sx, Cx);
      SinCosD(ya * 2, Sy, Cy);
      SinCosD(za * 2, Sz, Cz);
      xa := x;
      ya := y;
      x := xa * (cy*cz) + ya * (-cy*sz) + z * (sy);
      y := xa * (sx*sy*cz+cx*sz) + ya * (-sx*sy*sz+cx*cz) + z * (-sx*cy);
      z := xa * (-cx*sy*cz+sx*sz) + ya * (cx*sy*sz+sx*cz) + z * (cx*cy);

      x := x * Rout + CCx;
      y := y * Rout + CCy;
      z := z * Rout + CCz;

And here the images for the XYZ matrix, the ZYX matrix and my attempt with following rotations:


Title: Re: Overcome Singularity
Post by: cKleinhuis on October 24, 2010, 10:38:37 PM
hi jesse, not so bad renderings :D

here is the XZY matrix, for containing a little part of the complex pane :(


Title: Re: Overcome Singularity
Post by: M Benesi on October 25, 2010, 02:15:29 AM
so, for containing the complex plane the rotation order must be in that way, that <0,1,0>^2 yields: <-1,0,0>
wich would be a rotation around X Axis by 90 Degree ( up or down ) and an Rotation around Y Axis by 90 Degrees ( up or down ) to land on the point <-1,0,0>
  I'm not quite getting why you are doing 2 rotations when <0,1,0> only has to rotate once about the z axis to reach <-1,0,0>? 


Title: Re: Overcome Singularity
Post by: cKleinhuis on October 25, 2010, 01:27:52 PM
it is because i want to do 3 rotations, but i would like to have it include the <0,1,0>^2 -> <-1,0,0> property included


Title: Re: Overcome Singularity
Post by: Jesse on October 25, 2010, 07:29:38 PM
the mset is still missing in the xzy matrix, but the complete projections into other axis
is only valid for 90 degree rotations, so i wouldnt expect it?

nevertheless, the images for the pow2 and pow8 bulb i got, where the pow8 version
is more handsome like mostly:


Title: Re: Overcome Singularity
Post by: M Benesi on October 25, 2010, 07:50:30 PM
it is because i want to do 3 rotations, but i would like to have it include the <0,1,0>^2 -> <-1,0,0> property included

 Doy..  :embarrass:  I get it.    You're getting rid of the pesky smooth sections:
(http://lh6.ggpht.com/_gbC_B2NkUEo/TMXKS7t1CoI/AAAAAAAAAyo/6IZ-woBevL4/s144/demo.jpg)

I'd like to point out that the 3d equivalent of the 2d Burning Ship (http://en.wikipedia.org/wiki/Burning_Ship_fractal) fractal is easily implemented with (the mathematically correct version) of a classic Mandelbulb formula, although it is easier to perceive the mathematical relationship when you implement in the classic 2d method (with complex numbers).  
cross section:(http://lh5.ggpht.com/_gbC_B2NkUEo/TMcyUTs8e5I/AAAAAAAAAzE/LKQs-KlQ5tg/s288/burning%20ship%20cross%20section.jpg)  3d:(http://lh4.ggpht.com/_gbC_B2NkUEo/TMcyUAOgJjI/AAAAAAAAAzA/CldwNMpEOGk/s288/burning%20ship%203d.jpg)

  So the search for a 3d Mandelbrot (if this is your specific intent) is more related to finding the way in which to assign sign (+/-) to the components of the fractal (which may occur in your current regimen of attempts).  I've made many various attempts to preserve the 2d Mandelbrot cross section, and have found one, that I can recall at the moment, "sign assignment" method that works and is continuous for 3d z^2 (only z^2,6,10... though!), preserves the 2d cross section, and has 3d fractally goodness.

  Note that this works perfectly for a 3d Mandelbrot z^n of n=2,6,10,14....  It does not work for odd n, or n=4,8,12....  each of which require another method of sign assignment (remembering that there is a specific pattern of z^n which repeats every 4th n).

  Non singularity having z^2 3d Mandelbrot, cross section, front, pointed the other way, cross section, rear, top, bottom::
(http://lh5.ggpht.com/_gbC_B2NkUEo/TMegC4PGYUI/AAAAAAAAAzQ/vJujM6PChfE/s288/mset%20straight%20on.jpg)(http://lh5.ggpht.com/_gbC_B2NkUEo/TMegC1e-h8I/AAAAAAAAAzM/hVaMOULtSYk/s288/mset%20straight%20on%20cross%20section.jpg)(http://lh6.ggpht.com/_gbC_B2NkUEo/TMehUi1A7XI/AAAAAAAAAzk/htBf5pNAshE/s288/mset%20front.jpg)(http://lh4.ggpht.com/_gbC_B2NkUEo/TMegDOIk65I/AAAAAAAAAzY/HnoFDzmQV-I/s288/mset%20other%20side.jpg)(http://lh4.ggpht.com/_gbC_B2NkUEo/TMegDHzgTfI/AAAAAAAAAzU/L8IPlYXW8K0/s288/mset%20other%20side%20cross%20section.jpg)(http://lh5.ggpht.com/_gbC_B2NkUEo/TMegDJ5FbII/AAAAAAAAAzc/Dj2CZAhJ8cE/s288/mset%20rear.jpg)(http://lh5.ggpht.com/_gbC_B2NkUEo/TMeiZbVw0qI/AAAAAAAAAzo/Z3Vn1h15EGM/s288/mset%20top.jpg)(http://lh6.ggpht.com/_gbC_B2NkUEo/TMeiZXepZ3I/AAAAAAAAAzs/GdlHfrYNZrg/s288/bottom.jpg)

  Odd n z^n are perfect 3d Mandelbrot fractals if you do not apply the sign change below AND do not reverse the sign of the new z component.
Code:
   
r1= sqrt(y^2+z^2);

if n=2,6,10.... do:

if  (y > |z|)  {    
victor1=complex(x,r1)^n;                   
} else {                              
victor1=complex(x,-r1)^n;  
}

victor2=complex(sx,r1)^n;  
r3=r1^-n;
 
use with this formula:  http://www.fractalforums.com/index.php?topic=2081.msg18426#msg18426

Do the rest like normal, except (for z^2,6,10...) :
 nx=part_r(victor1);
 ny=part_i(victor1)*part_r(bravo)*r3;
 nz= -part_i(victor2)*part_i(bravo)*r3;    



Title: Re: Overcome Singularity
Post by: Jesse on October 28, 2010, 06:34:37 PM
Thank you Benesi for the explanations!

While testing these rotations, i found at least 2 burning ship versions  :)

Attached is a quite nice one that appears when doing a Z and a X axis rotation in a row (no 3rd rotation):


Title: Re: Overcome Singularity
Post by: M Benesi on October 29, 2010, 05:20:14 AM
Awesome Jesse. 

  If you zoom into those flat sections at the top, you will notice interesting patterns.  Little cookie cutter cut outs (at least if it's similar to some I've worked on recently). 


Title: Re: Overcome Singularity
Post by: Jesse on November 01, 2010, 09:57:01 PM
Some of the structures at the top, still have to test your other formula(s)...


Title: Re: Overcome Singularity
Post by: M Benesi on November 02, 2010, 12:54:07 AM
Jesse- Like the coloring and structures: looks a lot like my yard.  :D  Gotta get rakin' soon, before rain hits ~Thursday.  <-mental note to self, look at Jesse's fractal and remember to rake yard.

  Here's a straight on of the 'sign corrected' z^2 3d Mandelbrot (click image for bigger):
(http://lh5.ggpht.com/_gbC_B2NkUEo/TM9aGMYFgDI/AAAAAAAAA1E/UaB1L5frGm0/s288/the%20MandelLord.jpg) (http://lh5.ggpht.com/_gbC_B2NkUEo/TM9aGMYFgDI/AAAAAAAAA1E/UaB1L5frGm0/the%20MandelLord.jpg)