Logo by haltenny - 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: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 25, 2024, 03:54:01 AM


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: Another Nonworking Attempt  (Read 1699 times)
0 Members and 1 Guest are viewing this topic.
Geometrian
Forums Freshman
**
Posts: 19


« on: August 07, 2010, 12:04:49 AM »

Hi,

For a 2D Mandelbrot Set expressed in 3D (where X, Y, and Z correspond to the complex plane and height, respectively) the axis of rotation (of the complex numbers expressed in polar form) is [0.0,0.0,1.0].  So, to square Zn, you simply rotate it around that 3D axis.  This produces a "stack" of Mandelbrot sets along the z axis. 

I had the idea of taking the cross product of the major axis (X) and a vector to the current point to get a new axis of rotation.  Notice that, plotting in X, Y, Z, for Z=0, the axis is [0.0,0.0,1.0]; thus, the resultant solid will have a cross section at Z=0 of the Mandelbrot set.  However, as Z changes, the axis of rotation changes. 

After resuscitating some of my old GPU raytracing code, (which I have since rewritten, but didn't want to merge), I was able to plot the thing.  First the relevant part of the (GLSL) source, which should clarify the above explanation:
Code:
vec3 coord0 = vec3(x,y,z);
vec3 coordn = coord0;
mat3 rot_matrix;
float l;
for (int i=0;i<fractal_iter;i++) {
    rot_matrix = rotation_matrix_arbitrary( abs(normalize(cross(coordn,vec3(1.0,0.0,0.0)))), -atan2(coordn.y,coordn.x) );
    l = length(coordn);
    coordn = rot_matrix * coordn;
    coordn = l*coordn;
    coordn += coord0;
    if (length(coordn)>2.0) { return 0.0; }
}
"rotation_matrix_arbitrary" finds a matrix that rotates around an axis specified by the first argument by an angle specified by the second argument.  "atan2" must be hardcoded, because it doesn't exist natively in GLSL.

The result, unfortunately, is not a satisfactory 3D Mandelbrot Set, but I present it here for the interested.
Again, notice that the cross section of the thing is the Mandelbrot Set, but that it's not really a 3D fractal.

Ian

Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #1 on: August 07, 2010, 01:06:02 AM »

It' certainly a nice shape smiley
Logged
KRAFTWERK
Global Moderator
Fractal Senior
******
Posts: 1439


Virtual Surreality


WWW
« Reply #2 on: August 17, 2010, 03:57:25 PM »

Yes, pretty cool!  afro
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Internationalisation Attempt! Fractal Forums News cKleinhuis 0 1202 Last post June 22, 2009, 01:14:32 PM
by cKleinhuis
3D Mandelbrot (my 76. Attempt) 3D Fractal Generation trafassel 8 4674 Last post May 30, 2010, 09:17:58 PM
by kram1032
Another 3-D mandelbrot attempt (new) Theories & Research msltoe 5 551 Last post January 11, 2013, 03:49:42 AM
by jehovajah
Attempt at Unitary Mandelbrot Set (new) Theories & Research « 1 2 3 » kram1032 35 1870 Last post May 17, 2013, 04:59:29 PM
by kram1032
Flake - second attempt Movies Showcase (Rate My Movie) Kalles Fraktaler 6 1288 Last post January 20, 2014, 03:50:13 AM
by Dinkydau

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.217 seconds with 26 queries. (Pretty URLs adds 0.007s, 2q)