Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Mandelbrot & Julia Set => Topic started by: M Benesi on June 02, 2013, 12:44:55 AM




Title: Rotation Matrix Mset
Post by: M Benesi on June 02, 2013, 12:44:55 AM
  A little more computation... for the same thing.  :D  Will this allow a different approach to the bulb?  Yes.  Will it be better?  Know.  <--  it's a pun, figure it out
Better code:
Code:
//  sx and nx are x variables...
//  sy and ny are y variables...
//  r1 is the new magnitude

theta=atan2(sx+flip(sy));
r1=(sqr(sx)+sqr(sy))^(n/2);

nx=r1;   //just set them to the magnitude
ny=-r1;   // this has gotta be negative, or else you get a rotated Mset

// the + pi/4 is to correct rotational drift for all n... try it without

sx=nx*cos(theta*n+pi/4)-ny*sin(theta*n+pi/4);
sy=nx*sin(theta*n+pi/4)+ny*cos(theta*n+pi/4);



// test bailout, repeat...



Title: Re: Rotation Matrix Mset
Post by: M Benesi on June 02, 2013, 08:30:51 PM
  In 3d, doing something very similar leads to the "Spun Mandelbrot" of yore.  I know this has all been said before, but I'm thinking about it now, and mentioning it might spark an idea in someone....

  After applying a 3d rotation matrix (http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/) (thanks Glenn Murray, for doing the work!), rotating about the vector (http://en.wikipedia.org/wiki/Euclidean_vector) (0,z,-y), you end up with the spun Mset:

new x= x^2- (y^2+z^2)
new y= 2*xy
new z= 2*xz

  To get the vector (http://en.wikipedia.org/wiki/Euclidean_vector) to rotate around, I made the assumption that we rotate from the x-axis to the point (x,y,z), so took the cross product (http://en.wikipedia.org/wiki/Cross_product) of the x-axis (1,0,0) and (x,y,z). 

  When you do the standard 2d Mset, you rotate around the vector (0,0,-y), which happens to be the same vector you'd rotate around if z=0.....   :p