Sunday, June 12, 2011

Very simple formula for fractal patterns

I found an intriguing post on the web with a very simple formula to create fractals that I would like to share with you. The text and pictures are quotes from http://www.fractalforums.com/new-theories-and-research/very-simple-formula-for-fractal-patterns/

The formula is:
x=abs(x)
y=abs(y)
m=x*x+y*y
x=x/m+cx
y=y/m+cy


In "Mandelbrot" mode (cx and cy equal to the point coordinates), this is the result:

A close up of the border:
 The outside looks interesting, but insides looks like random noise, wich with lower iterations turned to be just curved lines with irregular spacing. So this noise is caused by aliasing.

The good stuff comes when picking some "julia" values (cx and cy being a constant value for all points)

This is cx=-0.5, cy=-0.5 :





cx=-0.2, cy=-0.1 : 





Let's do a zoom on the last one, because I think I've seen this "entangled trees" before..


More examples, always just changing cx and cy only, and choosing some colors:










Amazing isn't it? Happy coding :)