Barnsley Formula
From Ultrafractal Wiki
see also:
- Geometric eg Barnsley Image
- Barnsley 1 (Julia) example: Bump Maps Texture
Michael Barnsley describes this kind of formulas in his book "Fractals Everywhere", but as far as I can see he doesn't give the formula a special name. Most of the stuff in this book and also in his later book "Superfractals" is based on IFS (Iterated Function Systems), which is basically another story. The Barnsley Formula as we know it, I baptised "decision fractal", but maybe some you can introduce a better name. English is not my mother language, as you undoubtedly will see from my texts.
I put it on the UF database (in ea.ufm) at about the same time that UF5 has been introduced and maybe that one of the reasons that most of you don't know that I also added some elucidation in ea.txt. I hope it will give some help. If you have comments or find mistakes or other nonsense in it, please mail it to me.
Here follows the copy of the original text in ea.txt:
BarnsleyJ DeLuxe and BarnsleyTechnoJ (in ea.ufm)
Contents |
Intro
In Barnsley DeLuxe some of my own ideas are combined with those of other authors. Nevertheless I know that also other Barnsley variations can be found in the individual ufm's of the UF database. DeLuxe only gives de Julia version of Barnsley's decision formula, BarnsleyTechno is a subset of DeLuxe, so it has less possibilities than DeLuxe, but in Techno we see both sides of the coin: Julia and Mandelbrot.
The code has been written in 'old style' code, no facilities of UF5 are used, that's why the title is Barnsley DeLuxe UF4. It works in all versions, UF 3, 4 and 5.
Short history
Michael F. Barnsley describes in his book "Fractals Everywhere" (1988/1993) the "IFS" concept. It involves more than 90% of the text, but he also mentioned another fractal system: 'decision' escape fractals. Tim Wegner and Bert Tyler apply the latter type in their FractInt software in "BarnsleyM" and "BarnsleyJ", type I, II, and III (1991), followed by a.o. Frederik Slijkerman (Formulas\Compatibility\Fractint.ufm), and others.
In Ultra Fractal there is a number of formula authors using this FractInt Barnsley concept: Klaus-Peter Kubik, Dan Kuzmenka, Eric Reckase, Gilles Nadeau, Michèle Dessureault, Mark Townsend, Olivier Steiger, Ron Barnett, Toby Marshall, and others. Among them also Samuel Monnier in sam.ufm, wih his "IFS-Barnsley" formula (which is in essence no IFS). Jock Cooper enhanced this formula in: "IFS-Barnsley+jockIII", in jock.ufm. BarnsleyDeLuxe (ea.ufm) is based on the work of Monnier and Cooper. The bailout options are from Michèle Dessureault's "md-barnsley-imj" (mde.ufm), and some extra options are taken from Olivier Steiger's Barnsley ufm's. It's not my intention to replace Jock's ufm, nor other ufm's, but only to introduce a number of new possibilities, some based on work of other authors.
Principle of a Decision (Escape) Fractal
We all know that during an iteration process, in every cycle, z is changing. At every iteration from z a specific real number r is calculated and then compared with a chosen parameter, the "critical value". If r is higher than that parameter, then the next iteration is follows the "Hi" branch, if not then it goes "Lo".
In Barnsley's original concept the differences between the Hi and the Lo branch were only slight ones . Later on Monnier and Cooper added new options, different in both branches. We now have two formulas in these branches, each with distinguished Julia constants. In the "normal" Mandelbrot/Julia concept we have only one iteration formula, with one Julia constant c (in a J this c is constant, in a M, c depends on the pixel value). Also in the decision formulas of Barnsley's Julias there only was one c value.
In the original work of Barnsley, Wegner and Tyler, the critical value always is zero, Monnier introduced the adjustable real parameter "critical value".
Of course there are different possibilities to derive a real number out of a complex one, most obvious is to take the real or the imaginary value of z, but there are many more choices possible.
Input of the Julia constants c
In a "normal" M/J fractal, using only one formula there also is only one complex c. The same was in the original Barnsley decision formula and it could easily been adjusted, using the Explorer Tool (in UF4 or UF5). In our case, with two complex c-values it's somewhat more complicated. In Barnsley DeLuxe there are 4 options:
Directly
Both for the Hi and the Lo branch the c values are chosen independently: real(c1), imag(c1), real(c2), and imag(c2).
Via Functions
It's the way both Monnier and Cooper did apply. Only one fictive pseudo c: "b-seed" is choosen. From this b-seed, c1 and c2 are calculated via functions. When we use the same function for Hi and Lo, then c1 = c2, but when we use different functions, then c1 is not the same as c2.
Techno (default)
This is a very specific case in which imag(c1) = 0 and real(c2) = 0. so only two components remain: real(c1) and imag(c2), which are provided via the complex "t-seed". In this option the horizontal and vertical lines and structures in the fractal are emphasised.
Original
This is the way used by Barnsley, Wegner and Tyler: c1 = c2, the "original (Barnsley) seed".
Decision
The decision between Hi and Lo after every iteration depends of:
The adjustment of the critical value
In cases we get a black plane, it often is sufficient to change this parameter. Anyhow, the graphical result always depends strongly of this parameter.
The way of calculating the real number r from z
In principle there are infinite ways to do so, in Barnsley DeLuxe there are (arbitrarily) 37 modes available, among them 12 alternating modes. In the latter ones, during successive iterations, every time two different calculations are made. In the Monnier/Cooper formulas there only is one alternating mode.
Function mode
To enhance the number of options, the possibility has been added to apply not only r as such, but also as a function of r. In the case of alternating modes (see 5.2.) there also is an extra option: the Alternate Function Mode.
Mode scaling
A scaling with one or more factors in a particular mode formula.
Hi and the Lo branch
In both branches the same options are available:
Math formula
main
Based on the original Barnsley I and II formula
jocks
A variation of Jock Cooper
deviant
Variation in which c acts as a vector
type III
FractInt Barnsley type III
alt
A Barnsley variation as e.g. in alt.ufm, c acting as a power
Steiger variant
Dr. Steiger introduced some modifications of the original Barnsley formula: 'parabolic', 'gaussian', and 'sine'. They can be applied in all cases of (6.1.) Default is 'none', then all Steiger variants are disabled.
Primary Function
The function used in the iteration formula.
Primary Parameter
A parameter, used in the iteration formula
Flight
If Flight is enabled then c is no longer a constant. At every iteration it will be shifted over a constant value, and that of course does influence the calculated z. The amount of the c-shift to be adjusted by the Flight Parameter. (The flight option doesn't work when mode = type II).
Operator
The operator manipulates z in every cycle. Four options: 'none', '+' (plus), '*' (multiply), and '^' (power). Subtraction can be applied by adding (+) a negative number. By activating 'invert' the options 'multiply' and 'power' are changed into 'divide' and 'root'. Default: 'none'. When another operator option is activated a new option appears:
Skip cycles
Number of first cycles for which the operator action will be skipped. Default: 0, no skipping; 1 = only the first cycle skipped, etc. It's about the same as Olivier Steiger's "gluing". He describes it as "gluing makes the loop algorithm skip [the operator action of] the first iteration, because for many .ucl the first step is of special importance. This may remove also some 'splitting edges' (of the ucl.s)".
Note: When you don't want an operator action, but you'll still use the possibility of a secondary function (6.8.), with, or without 'gluing', you can for instance activate 'Operator' by the option '+' (6.6), and use for the secondary parameter (6.8.) the complex value = (0/0).
Secondary Function
The result of the iteration can be modified by an arithmetic operation (6.6.), a gluing option (6.7.), and afterwards a second function can be taken, the secondary one.
Secondary parameter
Works together with the operator in (6.6).
Power
Although in most cases this power will be 1/0, the possibility is offered to change this parameter.
Bailout
Most Barnsley software routines have only one bailout option: mod = square modulus (|z|), but some have more (Dessureault, Kubik, Kuzmenka, Steiger). In Barnsley DeLuxe mainly the procedure given by Michèle Dessureault has been followed.
Three parameters:
Bailout Test
(16 options, default: 'mod')
Bailout Function
(The same as the "Goofy functions" of Steiger) (8 options, default: 'ident')
Bailout Value
as usual, (default: 1000)
Mandelbrot version
In Barnsley DeLuxe are four, in stead of the more usual two components of c, so it's not possible to apply a switch for this Julia version into one Mandelbrot, there's more than one M's possible. Most BarnsleyM pictures are not very interesting from an artistic point of view, and further, the switch isn't really necessary. You can find out the most interesting values of c, using the Explorer Tool of UF4/UF5. In fact the Explorer Tool window of a c is a M-plane, but an empty one and that's a pity, we don't see the M-structures in this plane, so finding optimal values of c's is less easy than with the usual switch tool.
In the subset BarnsleyTechnoJ, there only is one (pseudo) c, so here a M version could be written: BarnsleyTechnoM. It's a confirmation of my statement before, the M pictures are in my opinion unfit for "fractal art", but very useful as a map of Julia's, for searching interesting possibilities.
Original Barnsley types I, II, and III
Barnsley DeLuxe has been written with Jock Cooper's "mechanical gallery"[1] in mind . But it's also possible to make traditional Barnsley pictures as given in FractInt. The data for the three main types:
----------------------------------------------------------------------
Data for the original 3 Barnsley types from FractInt (Tim Wegner c.s.)
----------------------------------------------------------------------
type I type II type III
maxiter 149 149 149
General mode real type II real
function mode ident ident ident
scale parameter 1 1/1 1
critical value 0 0 0
input original original original
recommended start seed 0.6/1.1 0.6/1.1 0.1/0.36 (see 1. below)
bailout test mod mod mod
bailout function ident ident ident
bailout value 4 4 4
Hi formula main main type III
Steiger variant none none none
types III variant --- --- c inactive
primary function ident ident ident
primary vector -1/0 -1/0 -1/0
operator none none none
skip cycles 0 0 0
sec. function ident ident ident
power 1/0 1/0 2/0
Lo formula main main type III
Steiger variant none none none
types III variant -- -- real
primary function ident ident ident
primary vector 1/0 1/0 -1/0
operator none none none
skip cycles 0 0 0
sec. function ident ident ident
power 1/0 1/0 2/0
----------------------------------------------------------------------
1. The image is exact the same as Slijkerman's Barnsley 3 (Julia) in Fractint/ufm. The image in T.Wegner c.s., "Fractals For Windows" (1992) is different, more in the neighbourhood of a start seed = (0.4/0.0).
Note
Maybe a superfluous remark but nevertheless a useful one. To explore the action of each option you can make a two identical layers, including identity in gradient and the position of it. Then in Layer Properties, choose for the upper one 'difference', and for the bottom one 'normal', giving a black window. By changing a parameter or option in one of both layers you can easily detect the effect. Change always only one parameter or option, not more than one. When Exploring the effects it is often useful or even necessary to use another ucl than the 'normal' Smooth(Mandelbrot), e.g. one of the Orbit Traps options in standard.ucl.
Of course this remark is a general one, not only useful for this Barnsley DeLuxe formula.
Examples
Barnsley Ex.1 is a "straight on" Techno: a combination of 2 layers with one of the new alternating mode options.
Barnsley Ex.2 reminds some 20th century abstract paintings.
Barnsley Ex.3 gives one of the possibilities, using the deviant formula.
Acknowledgements
My thanks for using the results of my predecessors: Samuel Monnier and Jock Cooper (for the general concept), Michèle Dessureault (bailout options), Dr. Olivier Steiger (goofy function, gluing options and Steiger formula variants) and all others, including Janet Parke and Kerry Mitchell for their wise lessons. At last, not to forget, thanks to the intiator of the whole 'decision' concept, Prof. Dr. Michael F. Barnsley.
Ed Algra (july 2008)
