Julia Sets. (Back) (Root)


A cosine and a quarticJulia set

This article assumes you've read the Julia set article under real and complex fractals. It includes the algorithm for Julia sets using transcendental functions which is also repeated here This article fills in some details about Julia sets with functions other than z^2 as their basic function. The fractal on the left, above uses the complex cosine function as its basic function. The algorithm for this type of fractal is given below. The parameter for the cosine fractal shown above is 0.38+1.8i. It's view window is the 6x6 square with (0,0) at its center. The complex exponential also works in the algorithm below with the escape test |z|<12.

Julia set membership algorithm for cos(z).

Choose the parameter  mu=a+bi.

Pick an iteration cutoff limit.

For every point (x,y) in your view rectangle 
  Let z=x+yi
  Set n=0
  While(n less than limit and |z|<12)
    Let z=cos(z)+mu
    Increment n
  End While
  if(|z|<12) then z is a member of the approximate 
    Julia set, plot (x,y) in the Julia set color
  otherwise z is outside the Julia set, 
    plot (x,y) in the outside color.
End for

The polynomial fractal above has mu=0.635+0.8418i and is based on the function f(z)=z^4+mu. The algorithm for such fractals is given below. Notice that the escape condition |z|<2 is the same as for the quadratic Julia sets. If you use a more complex polynomial then the escape condition becomes |z-w|<2 where w is some constant you need to discover experimentally. For f(z)=z(1-z) for example it's about w=0.5+0i.

Polynomial Julia set membership algorithm.

Choose the parameter  mu=a+bi.

Choose a polynomial f(z)=z^n.

Pick an iteration cutoff limit.

For every point (x,y) in your view rectangle 
  Let z=x+yi
  Set n=0
  While(n less than limit and |z|<2)
    Let z=f(z)+mu
    Increment n
  End While
  if(|z|<2) then z is a member of the approximate 
    Julia set, plot (x,y) in the Julia set color
  otherwise z is outside the Julia set, 
    plot (x,y) in the outside color.
End for

One thing you will notice about the Julia sets based on f(x)z^n+mu is that they have a overall n-fold symmetry. Examine the two fractals below which are based on f(z)=z^3 and f(z)=z^5. The three-fold and five-fold symmetries are easy to see. The article on how Mandelbrot sets index Julia sets is a good one to read for planning these sort of Julia sets.