Logo by Dinkydau - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. September 18, 2020, 08:08:11 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Rotation Matrix Mset  (Read 1075 times)
0 Members and 1 Guest are viewing this topic.
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« on: June 02, 2013, 12:44:55 AM »

  A little more computation... for the same thing.  cheesy  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...

« Last Edit: June 02, 2013, 02:13:20 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #1 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 (thanks Glenn Murray, for doing the work!), rotating about the 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 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 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

 
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
A total MSet generalization. Let's collaborate on something! Timeroot 8 1863 Last post February 01, 2010, 03:54:32 AM
by David Makin
Rotation matrix & inverse rot Mandelbulb 3d DarkBeam 6 5003 Last post June 21, 2011, 09:26:34 AM
by DarkBeam
Mset zoom - Roll, wrap, turn, twist and go in Movies Showcase (Rate My Movie) youhn 0 510 Last post October 08, 2014, 07:55:29 PM
by youhn
Mset in a 1991 ms-dos virus Mandelbrot & Julia Set TheRedshiftRider 4 829 Last post June 21, 2016, 06:12:16 PM
by TheRedshiftRider
The 4d rotation matrix! Mathematics DarkBeam 2 1382 Last post November 20, 2016, 01:40:49 PM
by Sabine

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.101 seconds with 27 queries. (Pretty URLs adds 0.006s, 2q)