Jump to content
Science Forums

An Interesting (fractal) Formula


Kharakov

Recommended Posts

It's a pretty straight forward rotation based fractal formula, but I really enjoy the complex patterns it generates (images follow):

victor=complex(sx,sqrt(sqr(sy)+sqr(sz)));       // complex (x,y) creates a complex variable with 
bravo=complex(sqrt(sqr(sx)+sqr(sy)),sz);       // the x component corresponding to the real component
cramden=complex(sx,sy);                       // and the y being the imaginary component
	                         
r1=cabs(cramden)^-n;   //  cabs(XXX) calculates the magnitude of a number (complex, quaternion, or real)
victor=victor^n;
bravo=bravo^n;
cramden=cramden^n;
	
nx=part_r(victor);             // you might notice that I switched the new y and z components
ny=-abs(part_i(bravo));  
nz=-abs(part_r(bravo)*part_i(cramden))*r1;

add in pixel or julia components  (use + absolute value for the y and z components unless you want a really weird distorted fractal)

 

Here are a couple z^2 to start:

Click fer a bigger image:

Yup, I said fer.

 

This is the above image, prior to zoom in, etc.

 

Different part of the fractal:

 

Then the kicker, the z^6 has some nice organic stuff in it (like brambles or somethin'):

 

And it (the z^6) has the tower stuff, but it's a bit more organic in sections:

 

As with all fractals, this one can be explored. Not really too familiar with it as of yet, as it's 3d and takes a bit of time to calculate on my computer. Eventually these 3d fractals will be as quick to calculate as 2d fractals are today... but that's the future...

Link to comment
Share on other sites

It's a pretty straight forward rotation based fractal formula, but I really enjoy the complex patterns it generates (images follow)...

I'm totally impressed. Nice images.

However, I was unable to follow the code you provided. there were undeclared variables, and I saw no loop structure over the domain of the images. :mellow:

Link to comment
Share on other sites

I'm totally impressed. Nice images.

However, I was unable to follow the code you provided. there were undeclared variables, and I saw no loop structure over the domain of the images. :mellow:

 

 

Durp... Apologies. Let me explain my formula, and ChaosPro's syntax a little better.

 

First of all, what I posted above is basically one iteration (one loop), WITHOUT pixel additions. I generally initialize sx,sy,sz to whatever seed values I want (0,0,0 usually) prior to the first iteration, adding in pixel values at the end of each iteration.

 

sx,sy,sz,nx,ny,nz are reals, they are like an extended double float, being 80 bit precision (14 bit exponent and 64 bit mantissa) rather than 64 bit

 

victor, bravo, and cramden are complex numbers with each component having the same precision as the reals (I use complex numbers instead of trigonometric functions because they are quicker, and I like them... remind me of 2d Mandelbrot)

 

victor= complex (1 , 2) sets the complex variable victor to 1 + 2i

bravo = complex (3 , 7) sets bravo = 3 + 7i

....

 

sx = starting x value of iteration

sy = starting y value...

sz = starting z..

 

nx = new x value prior to addition of pixel component (pixel for Mandelbrot type, Julia seed value for Julia type)

ny = new y value... // Add in pixel components for Mandelbrot type fractals

nz = new z.... // use absolute value of the y and z pixel components for a more uniform fractal (it's just nicer)

 

part_r (complex number) = real part of the complex number

part_i (complex number) = imaginary part...

 

cabs (complex number) = magnitude of the complex number

number^n = number raised to the nth power (for complex, real, or otherwise)

 

I suppose it's time to clean up my code yet again and post to ChaosPro's database. I've also a few coloring algorithms that bring out the structure of the fractal (or at least portions of it) nicely.

Link to comment
Share on other sites

Thanks Don, the whole fricken fractal is weird... I'm thinking its intricate structure could be used for gaming, especially using various julias as game worlds with complicated structures.

 

 

Rade- Complex numbers are pretty interesting, I'd check out the wikis on the Mandelbrot Set, and complex numbers, and imaginary numbers.

 

"i" signifies the imaginary unit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...