Part III; Coose them all



Continued from the top level post.

Hello again!

Here the third part of the reverse Julia set IFS improvements

BEGIN

Choose them all:

IFS is normally controled from a random integer that chooses one of the
rules of the system to use for next iteration but not always. A L-system,
(that is a form of IFS), uses a recursive, (often self-calling) algorithm to
transform the start-level down to a choosen number of levels, (seldomly more
than 10). A recursive algorithm can be used for any IFS not only L-systems,
You can start from, for example all points on a circle or a square or
anything*, (simplest is of course a single point) and then transform them in
n-levels towards for example a Sierpinski triangle using all possible
combinations of rule-indexes**.

* for a circle, (or any geometric object) it is often enough to transform
only its center coordinate and then scale the radius and use a circle
function to write it.
** One can choose if all levels are to be written or only the bottom level.

The images on this page are from such a system, (I'm not so sure it is a
L-system anymore even if the texts on the page says so)

http://members.chello.se/solgrop/Fractalus/LGalleri.htm

A system like this can also be used for a reversed formula Julia set. A
recursive algorithm is neat to have and also pretty fast but it is a bit
complexed to understand, (nothing for newbee programmers but I have got an
algorithm like that and I may post it to here some day but it needs a bit of
cleaning up first to look nice.*) There is a much simpler way to go but it
is slower (and much slower if many levels is to be written).

* I posted a link to a pre-copiled Basic program to here about a year ago
that uses the algorithm, here a rerun of thath:
http://members.chello.se/solgrop/Binary/Dragons.zip
Run in fullscren else it won't work, (for me, maybe for you?) The zipfile
also contains the QBasic source where you can find the algorithm.

A reverse formula Julia set uses a boolean to choose one of the two roots.
If you like to write say 24 levels then you will get 2^24 = 16777216
diffrent combinations of choieses. If you start at Z = [1.0, 0.0] and then
does the 24 iterations for every combination then you will get a picture of
a Julia set after 24 iterations. This method will not get deeper into the
spirals than the choosen level but it will make a perfect image of n-levels,
all points of the level are equally reachable so the image will get rather
good. If you like to get deeper,. let's say 32 levels then this takes
4294967295 combinations. The image will not get much better but it takes 256
times more iterations to get compleated. Not the way to go if you like to
get deep into the spirals of the Julia.

A simple algorithm to get all possible combinations of indexes:

Use a long integer, here named "I" to count thru all possible combinations.
Say we are using 16 levels then do this

Pseudo-code:

FOR I < 2^16
I copy = I
FOR n < 16
boolean choise = I copy AND 1
do your IFS transform here
I copy = INT (I copy / 2)
INC n (increment by one)
NEXT n
INC I
NEXT I

Every time I is incremented by 1 it will contain a new series of ones and
zeros. These are then picked from the copy of I one by one from the boolean
logic AND. I copy is then divided by two* to get the next bit to the lowest
position, (this is why we are using a copy of the variable). This is done 16
times to get all the 16 "choise" bits that we use for the IFS.

* If you are using this method for some outher IFS that has got more than
two rules, let's say three, (A sierpinski for example) and 10 levels then
count I from 0 to 3^10 and then use MOD 3 insted of AND 1 and use I copy =
INT (I copy / 3 ).

END

Regards:
SunCode

Next time, le grand finale; Part IV: A combiation of the methods.



.



Relevant Pages

  • Re: IFS inverse algoritm
    ... >transformation-parameters from a table, now if we try to do this the outher ... >exclueded) when the iteriations has ran out is considered as IFS! ... There are Iterated Function Systems in which there is not a unique ... you've produced an algorithm for IFSs that I ...
    (sci.fractals)
  • Re: ifs image width and height
    ... Is there some way to predict the width and height of an IFS attractor? ... it applied number theory to sampling ... technology improved faster than I could work on the algorithm with the ... result--you currently can hardly tell the demonstration java is ...
    (sci.fractals)

Quantcast