The
Buddhabrot is a distinctive fractal image which is so-named because
it resembles the iconic image of Buddha seated in meditation. The
algorithm which renders it was originally conceived by Melinda Green in
1993 and is a subtle variation of the one which is used to graphically
depict the Mandelbrot Set.
As in
Mandelbrot's method,
the Buddhabrot is created by subjecting
points z
0 in a chosen region of the complex plane to
repeated iterations of the mapping:
z → z2 + z0
where z initially starts at 0. However, whereas the Mandelbrot
image is obtained by colouring points according to how many iterations
it takes for them to diverge, the Buddhabrot colours points according
to how many times they were visited in the course of mapping the
divergent points. The algorithm can be summarised as follows:
For each point z
0 in a chosen region of the complex plane
(which is centred on the origin), perform the Mandelbrot map to see if
it is a divergent point, i.e. moves outside a specified distance R
0
from the origin within a maximum number of iterations (say, 1000).
For each of these divergent points, z
0’, determine the
set of values {z} it becomes by repeated application of the Mandelbrot
mapping process, up until the point at which it diverges (i.e. moves beyond a
distance R
0 from the origin). For each of the values z
in the set {z}, add 1 to a counter, HitCounter(z).
HitCounter(z) records how many times each point z in the complex plane
was visited in the course of mapping the entire set of divergent
points.
We then colour the complex plane according to the magnitude of the
HitCounter(z) values. To do this, we define a function Colour(q)
that maps HitCounter(z) to one of a set of chosen colours. For
example:
Define: q = HitCounter(z) / Max {HitCounter(z) }
For 0 < q < 0.2, let Colour = Red
For 0.2 ≤ q < 0.4, let Colour = Magenta
For 0.6 ≤ q < 0.8, let Colour = Blue, etc.
We then simply plot these colours as a function of z using our
favourite graphics package. One detail is that the image needs to
be rotated by 90° clockwise to ensure the Buddha-like image is
correctly oriented. This is done simply by rotating the
coordinate axes at the end of the calculation.
The main difficulty with the Buddhabrot rendering is that it requires
many more points to be processed than for the standard Mandelbrot
image, hence it is far more computationally demanding. Whereas we
can generate a reasonably good Mandelbrot image by performing the
iterative mapping process on a 700x500 matrix of points, the Buddhabrot
requires a far greater resolution than this (at least a 100
times). Clever algorithms have been developed to significantly
cut the run time by careful random selection of the points, choosing
points which tend to contribute the most interesting orbits (i.e. paths
that touch many points before they diverge). However, these
algorithms inevitably introduce distortion into the image, and so the
only sure-fire way to obtain a pure Buddhabrot is to crunch the numbers
and be patient.
The following shows how the algorithm to calculate HitCount(z) may be
implemented in a high level computer language (C++, VisualBasic, etc.)
Set:
R
0 = 5 (for divergence test)
iterLimit = 1000 (maximum number of iterations per point)
N = 100 (number of randomly generated points per pixel)
Define an array storedPath[k] that will hold the coordinates of the
points on a divergent orbit, and initialise:
storedPath[k] = (0,0) for k = 1 to IterLimit
Define a grid of points (X
0,Y
0) in the complex
plane. Each of these points is considered to lie at the centre of
a cell that maps to a single pixel in the diagram that will be plotted.
For example, X
0 and Y
0 may range from -5 to +5 in
increments of 0.01.
Define a matrix, HitCount(X
0,Y
0), that will hold
the number of times each cell, centred on (X
0,Y
0),
is visited in repeated mapping of the divergent points.
Initialise: HitCount(X
0,Y
0) = 0 for all points (X
0,Y
0).
For each cell centred on the point (X
0,Y
0):
Randomly select N points (x
0, y
0) that lie within this cell.
For each of the points (x
0, y
0):
Initialise:
x=x
0
y=y
0
iterCount = 0
hasDiverged = false
While hasDiverged = false and iterCount < iterLimit
Set:
a = x
b = y
Calculate:
x = a
2 - b
2 + x
0
y = (2 × a × b) + y
0
r = √(x
2 + y
2)
If r > R
0 Then
Set: hasDiverged = true
End if
Add 1 to iterCount
Set: storedPath[iterCount] = (x,y)
End while
If hasDiverged = true:
For k = 1 to iterCount
Set: (x,y) = storedPath[k]
Determine the cell (X,Y) which contains the point (x,y)
Add 1 to HitCount(X,Y)
Next k
End if
Next (x
0, y
0)
Next (X
0, Y
0)
Since I first created this page four years ago (in 2012), I have learned
that the artist and mathematician
István Aggott Hönsch has also
undertaken considerable research into the mathematical entity underlying
the Buddhabrot. He goes into the theory in some detail in his article
http://vixra.org/abs/1604.0392
and concludes that the Buddhabrot is just one of an infinite number of pareidolic
figures which may be obtained by placing restrictions on the divergent orbits
generated using Melinda Green's original algorithm.
Aggott Hönsch's findings concord with my own experiments, which have shown
that some interesting variations on the Buddhabrot image can be obtained
by limiting the set of divergent orbits to those having a length (before
divergence) satisfying a certain condition - for example, it is a prime number
or simply a multiple of a specified integer. Aggott Hönsch has come
up with a neat term for these incredibly detailed human-like images -
anthropobrots
- and exhibits some of the remarkable images he has obtained on his website:
http://apeirography.com.
Further distortions to the Buddhabrot image can be obtained by tweaking
the algorithm in other ways (for example, by perturbing slightly the
mapping function). These distorted images I term
Buddhabrot Mutants.
© James Travers 2012-16