Jump to content
Science Forums

Fractal Geometry of Nature


Racoon

Recommended Posts

It appears to be available.

When you download and run it, there is a menu pull-down called "Julia". What is this?

Julia was the name of Mandelbrot's daughter.

If you remember, the M algorithm was:

In the region around 0, 0i in the complex plane, pick any point C.

C = a, bi. Where a and b are real numbers.

Now square C then add C -- to get D.

Now square D then add D -- to get E.

Now square E then add E -- to get F... etc.

 

The J (for Julia) algorithm is:

In the region around 0, 0i in the complex plane, pick any point C.

C = a, bi. Where a and b are real numbers.

Now square C then add C -- to get D.

Now square D then add C -- to get E.

Now square E then add C -- to get F... etc.

 

Selecting the Julia Space gives you this second algorithm. And they are beautiful too! They are connected in the following manner.

If you start with MS and there is a BLACK pixel in the center (a member of the MS) and then display the corresponding JS, then all BLACK members of the JS will connect together. In other words, there will be just ONE set of connected points in the JS.

 

However, if you start with MS and there is a colored pixel in the center (NOT a member of the MS) and then display the corresponding JS, then the BLACK members of the JS will form an infinite set of unconnected regions.

 

The MS is therefore a "MAP" of JS. Every point IN the MS will produce a connected JS; every point NOT IN the MS will produce a infinitely unconnected JS.

Link to comment
Share on other sites

OK Pyro, I've got the formula in front of me, but I am lost about how I begin the calculations.

 

C = a, bi where a and b are any real numbers. I can create the looping formula looking for a value >2. But what gives me the starting value for each point on the space? And what is i?

 

I am just a poor boy and my story's seldom told

I have squandered my existance

For a pocket full of fractals such as Mandelbrot

 

Bill

Link to comment
Share on other sites

We will try again.

This is a zip file. You will have to unzip it to use it.

It should produce a folder named "MandelFiles" (I think).

Extract the folder to your hard drive.

Inside should be the executable Manbrot2.exe.

Double click on that.

 

And it is written in Java, not Perl. :hyper:

 

My avatar was made with this program!!!

Every time you click anywhere in the program's display, it will redisplay with 2X magnification, with your click point at the center of the new display.

 

 

Check out Pyrotex's Thumbnail Attachment!! Post #16 :confused: :hyper:

Its Wicked Sick! :circle: :shade:

 

Thats exactly-more than I could of hoped for!

Pyro is Da' Man!

Link to comment
Share on other sites

I am just a poor boy and my story's seldom told

I have squandered my existance

For a pocket full of fractals such as Mandelbrot

The Boxer. I love to whistle along with that song. :confused:

OK Pyro, I've got the formula in front of me, but I am lost about how I begin the calculations. C = a, bi where a and b are any real numbers. I can create the looping formula looking for a value >2. But what gives me the starting value for each point on the space? And what is i?

"i" is the square root of minus one. Having said that, ignore it. You will be dealing with ordinary "x,y" coordinates on your display plane.

Assume you have two variables a and b. Where C(0) = a, bi

 

a and b are the "x,y" points on a small section of the plane around the origin.

Absolute values for a and b need not ever exceed 2, though I use 2.5

 

So, you have to have two nested loops that look something like:

For a= Alow to Ahigh by Ainc; increment by Ainc

For b= Blow to Bhigh by Binc; increment by Binc

; perform all the iterations of C [below] until either

; number of iterations > IterMax [you're IN the MS, color=Black] or

; asq + bsq > 4. [Avoid taking the square root]

Next b;

Next a;

 

Now I can answer your question. Where you start is with selecting the low and high values of a -- and the low and high values of b. The increments you will use are determined by the number of pixel columns and pixel rows you will have in your final graphic. Say you choose 640 columns by 520 rows. (I did) And say you start with Alow=-2.5, Ahigh=+2.5, Blow=-2.5, Bhigh=+2.5.

Then Ainc will be 5/640, Binc will be 5/520. This will display the entire MS.

 

Now let's look at the iteration code INSIDE the double loop above.

Then C(1) = C(0)^2 + C(0)

C(1) = a', b'i, where we have to calculate the new a' and b'

asq = a*a;

bsq = b*b;

a' = asq - bsq + a;

b' = 2*a*b + b;

CntIter = CntIter+1;

newCsquare = asq+bsq;

 

Your iterations of C(n) stop under either of two conditions:

newCsquare > 4, in which case you plot the point with color CntIter,

or CntIter > IterMax, in which case you plot the point with color Black.

Then you fall into the bottom of the double nested loop, calculate the coordinates of the next pixel in the next column (or the first pixel in the next row) and repeat.

 

The tricky part in all this is the geometry of your display. Your question reflects that this is indeed the part you tripped on. No shame in that. I had to draw a dozen hand-drawn, pencil-on-paper diagrams showing the relations of my final pixel space, the rectangular subset of the starting MS values

(-2.5<a<2.5;-2.5<b<2.5), the coordinates of the center of my rectangle, and the a-increment and b-increment, before I wrote successful code.

 

This should get you started. If you get stuck, I'm here.

Link to comment
Share on other sites

Really dude... your screen and mine do not offer the same options!!

 

[ATTACH]474[/ATTACH]

 

This is correct - only moderators and members with more than 1,000 posts can delete posts. Check out the How To on the user levels in the How To forum.

Link to comment
Share on other sites

This should get you started. If you get stuck, I'm here.

I am going to need a little more hand holding on this Pyro.

 

I am all set with the nested loops and the dimensions of the field. I am working out how to do the colors. I am also including controls for rotating, panning and zooming.

 

I am OK with the conditions for ending the recursive calculation, and what to do with the results.

 

My problem is knowing how to do the recursive calculations...

 

Now let's look at the iteration code INSIDE the double loop above.

Then C(1) = C(0)^2 + C(0)

C(1) = a', b'i, where we have to calculate the new a' and b'

asq = a*a;

bsq = b*b;

a' = asq - bsq + a;

b' = 2*a*b + b;

CntIter = CntIter+1;

newCsquare = asq+bsq;

This part has me stumped.:naughty: :umno:

 

Help me Pyrotex! Help!

 

Bill

Link to comment
Share on other sites

I...Help me Pyrotex! Help!

"Here He comes, to save the day!"

Means that Pyrotex, is on the way!

:naughty:

 

Sure! Glad to help!

The basics of complex arithmetic:

 

We do CA on the Complex Plane, where the X-axis is "real"

and the Y-axis is "imaginary". All values up and down the Y-axis are considered to be multiplied by the square root of minus one, or "i".

 

"Numbers" in the CP correspond to points, with a real component and an imaginary component. For example, (3,4i) or (-17,-i).

 

Sometimes (often) complex numbers are represented as 3+4i or -17-i.

 

Assume two complex numbers A and C: (a,b,c,d are all real)

A = a + bi

C = c + di

 

--------------Complex Arithmetic:

ADDITION

E = A + C

= a + bi + c + di

= (a+c) + (b+d)i

 

MULTIPLICATION

F = A * C = (a + bi)*(c + di)

= a*c + a*di + bi*c + bi*di

= a*c + (a*d + b*c)i + b*d*(-1)

= a*c - b*d + (a*d + b*c)i

 

SQUARING

G = A squared = (a + bi)*(a + bi)

= a*a - b*b + (a*b + a*b)i

= a*a - b*b + (2*a*b)i

 

So, in the code you have trouble with, this is how the math works. We are squaring a complex value and then adding the complex value.

 

A^2 + A would equal

[a*a - b*b + (2*a*b)i] + [a + bi]

 

but it is easier to keep the squares in their own variable as you need them again for the iteration test.

 

Although the algorithm I gave you works just fine, technically you should ADD first THEN square. Starting with initial value zero: 0 + 0i. It works out the same except for calculating the distance of the new point from the origin. If you do it properly (Add, Square) then the distance from the new point A [a+bi] to the origin is:

distance = sqroot[ a*a + b*b ]

 

But it REALLY speeds up the algorithm if you avoid taking the squareroot!!!

So, instead of testing if distance <2

Rather, test if distance^2 <4

Distance^2 is just a*a + b*b, or in the code, asq + bsq.

 

Does this help???

Link to comment
Share on other sites

Does this help???

Yes, thank you. :hyper:

 

I am going to spend some time digesting this. I think my brain is getting a blister. Off to the math battle!

 

:smart: = (:umno:^2 + :rant:^2) - (:naughty:^2 - (Sqrt(:hammer:)) / Pi / (Log(:lol: + :umno: + :hihi:) / :doh: = :smart: + :smile:

 

Bill

Link to comment
Share on other sites

I love Pyro's posts and Attachment(s)...

So, Rac,

did you download the Mandelbrot Explorer and actually check it out?

Does anyone need instructions for using the MX?

And I am curious as to how BigDog is doing. Has he gotten his MX to work, yet?

Has anyone ELSE actually played with MX?

 

[...the sound of crickets in the distance...]:)

Link to comment
Share on other sites

;) Oh where Oh where

Has my Pyrotex gone

Oh where Oh where can he beeeee?:)

 

I am not as helpless as Polly Purebred, but I am struggling with this complex math!

 

I get what you told me in the last letter. Now I am struggling with how the iterations actually happen.

 

When I take c(0) and find c(1), I know what the values for a and b are for c(0). But what are the values for a and b for c(1). This stuff is about where I quit school and joined the carnival (figurativly).

 

The more I understand the more I am lost on this. :) I only need to build this thing one damn time and it will be out of my system! :eek:

 

Thanks for the help on this Pyro!

 

Bill

Link to comment
Share on other sites

So, Rac,

did you download the Mandelbrot Explorer and actually check it out?

Does anyone need instructions for using the MX?

And I am curious as to how BigDog is doing. Has he gotten his MX to work, yet?

Has anyone ELSE actually played with MX?

 

[...the sound of crickets in the distance...];)

 

Yes I did Pyro!

Like I said.. You Da' man..

 

Thing goes on infinitely now..,

It's So Rad :) :eek: :)

 

Having Computer troubles right now..

This AI will be bouncing around terminals..

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...