Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => General Discussion => Topic started by: aleph0 on September 20, 2013, 07:14:59 PM




Title: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: aleph0 on September 20, 2013, 07:14:59 PM
I posted this material when commenting on an error in the handling of terms z_0 (the initialisation term) and c (the fixed term) in the Mandelbrot/Julia iteration formula given in an UltraFractal-related thread (http://www.fractalforums.com/ultrafractal/switch-mode/) recently, but as I've seen the error repeated elsewhere I think it's worth a separate thread here...


The same iteration formula is used to determine membership of the Mandelbrot Set and all Julia sets and is usually written in this form (see for example p.161 of The Beauty of Fractals):

z_{n+1} = z_n^2 + c

Each point in the complex plane is a 'candidate' for set membership and the iteration formula is applied repeatedly to determine whether it is or is not a set member. If the iterate remains bounded (modulus less than or equal to 2), the point is a member of the set, otherwise (modulus greater than 2) it is not a member.

However, for each set, different initialisation criteria are applied before starting the iteration sequence.

For the Mandelbrot Set:
- c is set to the coordinates of each candidate point.
- z_0 = 0 for all candidate points. Hence from the iteration formula, the iteration sequence is z_1 = 0 + c = c, z_2 = c^2 + c, z_3 = (c^2 + c)^2 + c, and so on counting from iteration 1.

For Julia sets:
- A fixed point is chosen from the complex plane. This choice establishes the 'identity' of the Julia set to be calculated.
- c is set to the coordinates of the chosen point and remains fixed for all candidate points and across all iterations for each candidate point.
- z_0 is set to the coordinates of each candidate point.

The consequences of these distinct initialisation criteria are that:
- There is only one Mandelbrot Set.
- There is an infinity of Julia sets, resulting from the free choice of fixed point.

When drawing the sets on a pixel grid, the complex coordinate z_{pixel} of each pixel is used during initialisation:
- For the Mandelbrot Set, c = z_{pixel}
- For Julia sets, z_0 = z_{pixel}

Sometimes, descriptions of how the sets are generated fail to clearly or correctly address some aspect of the above. For example:
- They might clearly state the iteration formula but fail to state the initialisation criteria for z_0.
- They might treat z_0 as the fixed term in the iteration formula, whereas the fixed term is actually c and z_0 is the initialisation term for the iteration sequence.

Some additional points:
- All the above relates to the quadratic Mandelbrot Set and counterpart Julia sets. Other Mandelbrot sets are possible and are generated using different iteration formulae; in all cases, the z_0 term for the M-Set is initialised to a critical point of the iteration function (which is simply an alternative way to represent the iteration formula). Critical points are where the derivative of the iteration function is zero. For the quadratic M-Set, the iteration function is f(z) = z^2 + c and the derivative is  f'(z) = 2z. Solving for f'(z) = 2z = 0 yields only one critical point (z = 0); other functions may have several critical points, in which case a distinct M-Set can be drawn for each critical point.
- Any practical program for drawing the set will need to apply an iteration limit to prevent an infinite loop for points inside the set. Programs typically allow the iteration limit to be adjusted; to improve the fidelity of the rendering, it will need to be increased when zoomed deep and for certain areas of the fractal.

John.


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: jdebord on September 21, 2013, 09:27:47 AM
At the moment, I am working with the following functions:

(1) f(z) = z^p + c   with p integer or real

(2) f(z) = (1 - t) z^p + t z^q + c    with t real in [0..1]

So, z0 must be such that f'(z0) = 0

From eq. (1) we have:

f'(z) = p z^(p - 1)

and f'(0) = 0 only if p > 1

From eq. (2) we have:

f'(z) = (1 - t) p z^(p - 1) + t q z^(q - 1)

and f'(0) = 0 only if p > 1 and q > 1

So, the condition for using z0 = 0 would be : p > 1 and q > 1

Is this correct?

And what happens if p and/or q are complex?

Note: for those who have followed the recent discussion about Amygdala scans, eq. (2) has been studied by Rollo Silver in issue 33 but he did not explain which value of z0 he used (I assumed it was 0).


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: element90 on September 21, 2013, 01:03:26 PM
Quote
From eq. (2) we have:

f'(z) = (1 - t) p z^(p - 1) + t q z^(q - 1)

and f'(0) = 0 only if p > 1 and q > 1

So, the condition for using z0 = 0 would be : p > 1 and q > 1

Is this correct?

No it isn't. Don't get hung up on z0 being 0 as the actual critical value(s) often aren't zero.

So using your formula f'(z) = (1 - t)pz^(p -1) + tqz^(q -1)

you need to solve

(1 - t)pz^(p - 1) + tqz^(q -1) = 0

Using some example values for t, p and q

t = -1
p = 3
q = 4

2*3*z^2 + (-1)*4z^3 = 0

which becomes

6z^2 = 4z^3

cancel out z^2 and it becomes

6 = 4z

the solution is z = 1.5 which is the critical point and hence the value of z0 and it clearly isn't zero.

In this example there is only one critical point, if you had used q = 5 there would have been two critical points. This method works for all parameter types whether they be integer, real or complex, it does help if you have a calculator that supports complex numbers, mine does (HP-42S from 1987).

For simple formulae such as the these it is relatively easy to find the solution(s) for f'(z) = 0 for more complex f'(z) formulae the roots of f'(z) can be found using a root finding method such as Newton-Raphson (aka Newton's).

To muddy the waters, if c is used in the formula, you may be lucky and it cancels out or you may end up with an expression that includes c, be it c, c/2, sqrt(c) or anything really, this doesn't matter if the program you are using allows you to set z0 to an expression that includes c (the location in the complex plane).


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: aleph0 on September 21, 2013, 04:58:00 PM
If you don't have access to a calculator that supports complex numbers, Wolfram Alpha is a good way to check critical values.
    Start at this page:  http://www.wolframalpha.com/examples/Math.html (http://www.wolframalpha.com/examples/Math.html)
    Then click the "solve an equation" link under the Algebra heading.
    Then enter the 'derivative = 0' formula in the formula bar.
    Then click the equal sign.

A list of the solutions will then be displayed, including a breakdown into real and complex solutions if both types are found. The solutions are the critical values.

Try these values for example for jdebord's equation (2):
- t=-1, p=3, q=2 which generates f(z) = 2z^3 - z^2 + c and f'(z) = 6z^2 - 2z. Enter 6z^2-2z=0 in the formula bar. Returns two solutions, both real.
- t=-1, p=3, q=-2 which generates f(z) = 2z^3 - z^-2 + c and f'(z) = 6z^2 + 2z^-3. Enter 6z^2+2z^-3=0 in the formula bar. Returns five solutions, one real and four complex, none of them are zero.

Solutions are displayed in exact form by default, so will tend to show terms such as square roots, cube roots and so on, dependent on the degree of the polynomial solved. Use the Approximate Forms button to switch to decimal display and the More Digits button to get more precision.

If you need assistance to determine the derivative for an iteration function, use the "calculate a derivative" link under the Calculus & Analysis heading in the Wolfram Alpha Math page.

Thanks to Paul for adding the cross-link to the Ultra Fractal thread in my first post.


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: jdebord on September 23, 2013, 10:12:18 AM
Thank you for your replies. I have tried to find a general formula. Here I assume q > p

f'(z) = (1 - t) p z^(p - 1) + t q z^(q - 1) = 0

z^(q - 1) / z^(p - 1) = z^(q - p) = p (1 - 1/t) / q = a

z = a^(1 / n)     with n = q - p

If n is integer, the critical points will be the n n-th roots of a, in addition to zero which is also a critical point if p > 1 and q > 1.

With element90's example : t = -1, p = 3, q = 4 ==> z = 3 (1 + 1) / 4 = 3/2 (the other critical point is 0).

So, I should have to plot 2 Mandelbrot sets in this case: one with z0 = 0 and the other with z0 = 3/2 ?

PS. For my programs I use a FreeBASIC library. You can find it http://sourceforge.net/projects/fbmath/ (http://sourceforge.net/projects/fbmath/).


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: element90 on September 23, 2013, 11:19:55 AM
Quote
So, I should have to plot 2 Mandelbrot sets in this case: one with z0 = 0 and the other with z0 = 3/2 ?

You'll get two different fractals so it is at least worth trying.

I played with Mandelbrots based on cubic formulae that included terms for z^2 and z, each z^n term was multiplied by an associated parameter, adjusting the parameters leads to a large variety of pairs of critical values and consequently a large variety of Mandelbrot sets. For examples see http://element90.wordpress.com/2012/11/02/cubic-observations/ (http://element90.wordpress.com/2012/11/02/cubic-observations/) and http://element90.wordpress.com/2012/11/25/more-cubic-observations/ (http://element90.wordpress.com/2012/11/25/more-cubic-observations/).


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: hsmyers on September 23, 2013, 07:17:08 PM
@Strange Attractor, so for Newton's Method for Quartics, would the usefulness of critical value (presumably for the base poly of az^3 + bz^2 + cz + d) still apply? I ask because of the following attached snapshot.

--hsm
p.s. could someone point me to FAQ for posting so I care insert my math in LaTeX as it should be?
p.s.s. why is there no LaTeX icon, just the generic one?


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: Nahee_Enterprises on September 24, 2013, 01:08:50 PM
   p.s.    could someone point me to FAQ for posting so I care insert my math in LaTeX as it should be?
    p.s.s.  why is there no LaTeX icon, just the generic one?

When you are in edit mode, for posting a comment within a Topic, once you click the "LaTex" icon (located between the "Insert Quote" and "Insert List" icons), there will be a set of HTML values entered.  Just type in your formula between them and it will be formatted for viewing.  You can check it before actually posting by using the "Preview" button first.

Examples:

Normal text:   m = \sqrt{x^2+y^2+z^2}

as LaTex:      m = \sqrt{x^2+y^2+z^2}



Normal text:   x' = \frac{x^2 \left(3 y (m+y)-z^2\right)-\left(y^2+z^2\right) \left(y (m+y)+z^2\right)}{y(m+y)+x^2+z^2}

as LaTex:      x' = \frac{x^2 \left(3 y (m+y)-z^2\right)-\left(y^2+z^2\right) \left(y (m+y)+z^2\right)}{y(m+y)+x^2+z^2}
 


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: lkmitch on September 24, 2013, 05:59:50 PM
@Strange Attractor, so for Newton's Method for Quartics, would the usefulness of critical value (presumably for the base poly of az^3 + bz^2 + cz + d) still apply? I ask because of the following attached snapshot.

Unless I misunderstand your question (entirely likely), the critical value is exactly the wrong place to begin with a Newton's method fractal.  The equation to be iterated is:

z = z - f(z)/f'(z)

so at the critical point of f, the iteration blows up immediately.  Generally, Newton fractals are executed like Julia fractals, where z0 = pixel.


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: element90 on September 24, 2013, 06:25:14 PM
The use of Newton's equation to find critical points is a simple root finding exercise and nothing to do with Newton fractals.

For example if

f(z) = z^4 + z^3 + z^2 + z + c

The the roots of

f'(z) = 4z^3 + 3z^2 + 2z + 1 = 0

need to found.

Newton's formula is:

z(n+1) = z(n) - f(z(n))/f'(z(n))

so in Newton's formula

f(z) = 4z^3 + 3z^2 + 2z + 1
f'(z) = 12z^2 + 6z + 2

so the formula iterated to find a root is:

z(n+1) = z(n) - (4z^3 + 3z^2 + 2z + 1)/(12z^2 + 6z + 2)

The starting value for z is a guess at the root, iterating the formula should home in an actual root, which is a critical value.


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: hsmyers on September 24, 2013, 09:32:04 PM
Thanks Folks,

That was pretty much what I thought. Think I was just hoping for an interesting addition to the brew (strange)  :dink: :beer:

--hsm


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: jdebord on September 25, 2013, 09:10:08 AM
You'll get two different fractals so it is at least worth trying.

I have tried with p = 2, q = 3 and t = 0.1 (i. e. M2 "perturbated" by 10% of M3). The critical points are 0 and (-6). I get two pictures which are symmetrical with respect to the vertical axis. This seems to be the case with 2 critical points, as you mention on your site. Is this a general property ?

I have not yet tested with more than 2 critical points.

By the way, for solving polynomials, there are analytic formulae up to degree 4. See for instance the FreeBASIC library which I mentioned before.


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: jdebord on September 30, 2013, 08:51:31 AM
I have made a summary of my observations here:

https://www.dropbox.com/s/iwwhdbhejqnyyvv/mandelmix.pdf (https://www.dropbox.com/s/iwwhdbhejqnyyvv/mandelmix.pdf)

There are probably still some errors... Don't hesitate to correct me!


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: valera_rozuvan on July 23, 2016, 01:41:09 AM
I have made a summary of my observations here:

https://www.dropbox.com/s/iwwhdbhejqnyyvv/mandelmix.pdf (https://www.dropbox.com/s/iwwhdbhejqnyyvv/mandelmix.pdf)

There are probably still some errors... Don't hesitate to correct me!

The link is broken. Is the information that was in that PDF still relevant?


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: jdebord on August 04, 2016, 09:29:17 AM
The new link is here:

https://www.dropbox.com/s/v9l159icpe1fuij/tutorial.pdf?dl=0

The information has been completed with other types of formulae.


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: Adam Majewski on August 04, 2016, 04:37:12 PM
The new link is here:

https://www.dropbox.com/s/v9l159icpe1fuij/tutorial.pdf?dl=0

The information has been completed with other types of formulae.

Nice colors and pictures. What is the licence of the code ?


Title: Re: Terms z0 and c in the Mandelbrot/Julia Iteration Formula
Post by: valera_rozuvan on August 04, 2016, 05:04:54 PM
What is the licence of the code ?

For those that are not aware, the code is discussed in the following FractalForum threads:

1. Programme PANOMAND (http://www.fractalforums.com/franaise/programme-panomand/)
2. PANOMAND (http://www.fractalforums.com/other-b130/panomand/)

Quote
PANOMAND is an open source software for plotting Mandelbrot and Julia sets.