Mandelbrot and Julia fractals for $z_{n+2} = z_{n+1}^2 + z_n^2 + c$

302 Views Asked by At

The Mandelbrot and Julia type fractals are very Well known.

But such fractals follow from

$$z_n = f(z_{n-1},c)$$

In other words a recursion that only depends on the previous value and a constant. ( you could argue the starting value too , but it has “ No memory “ )

What would happen If we consider recursions based on the 2 last values ??

Would the shapes be similar looking fractals ? Different looking fractals ? Not fractals ?? More like a cellular automaton ??

For instance

We start with complex $z$ as first value. Second is $z/2$.

Then

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

How would that look like ??

1

There are 1 best solutions below

1
On

Here's what your suggested example looks like

enter image description here

Here's how I coded it in R:

xmin<--0.62
xmax<-0.08
ymin<--0.4
ymax<-0.4
res<-500

x<-xmin+(xmax-xmin)*ppoints(res)
y<-ymin+(ymax-ymin)*ppoints(res)
comb<-function(x,y) complex(real=x,imaginary=y)
i<-comb(0,1)   
z<-outer(x,y,comb)
w<-z/2
c<-z    
h<-matrix(rep(2,res^2),res,res)
count<-h    

for (k in 1:50) { temp<-w; w[Mod(z)<=2]<-z[Mod(z)<=2]^2+w[Mod(z)<=2]+c[Mod(z)<=2]; z<-temp; count[Mod(z)<=2]<-count[Mod(z)<=2]+1 }

z[Mod(z)<=2]<-h[Mod(z)<=2]

image(x,y,count-log(log(Mod(z))/log(2)),col=c(rainbow(250),'black'),asp=1)

You can play around with it. R is a free program.