Logo by miles - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. April 26, 2024, 02:14:33 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Using 2 formulae to generate fractals  (Read 1901 times)
Description: Switching between formulae depending on iteration
0 Members and 1 Guest are viewing this topic.
element90
Strange Attractor
***
Posts: 298



WWW
« on: September 12, 2011, 12:29:01 PM »

When I added transforms to my programs I included two sets of transforms, "Transforms A" and "Transforms B" and a "Transform Sequence" to control which set of transforms of transforms is applied at a given iteration. So if the transform sequence is "AB" then the transform set applied for the first iteration is A, the second set B is applied for the second iteration, the sequence is then repeated. For "AAB" transform set A is used twice as often as set B.

So using the formula Zacpac:

z = transform(z)
z = (z + c)^alpha

Using Transforms A

power, 2
translation, 0.5

and Transform B

power, 2

I have two formulae to play with namely:

z = z^2 + 0.5 + c
z = z^2 + c

Using a transform sequence of AAAAAAAABA I found this:

 

Changing the translation constant to 0.125 and the sequence to AAAAAAAAAB I found this:



Only two images so far, as I can easily add two sets of transforms to all my fractals (except Lyapunov and Pickover Popcorn) it is going to interesting playing with this facility.
Logged

Elelemt90 Fractals blog www.element90.wordpress.com
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: September 12, 2011, 02:30:14 PM »

hi there, i like the attempt on ordering the alternating/hybrid generation of formulas, i recently used another method,
which is more like a biased alternate:

range - a integer value
bias - a integer value <range

and then for each iteration the test is

if(iteration%range>bias){
useFormulaA
}else{
useFormulaB
}

it is not perfect, i know, but it could produce sequences like
AAAAABBBBBB
AAAAAABBBBB
...


when seeing those "AB.." strings, i have to think about l-systems, to produce longer - and more complicated - rule sequences ...
it is all about, "how to define an endless formula lookup table"....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
element90
Strange Attractor
***
Posts: 298



WWW
« Reply #2 on: September 12, 2011, 04:17:49 PM »

I got the idea for using the sequence string from the way Lyapunov fractals are generated.

cKleinhuls, your method only produces a subset of the sequences possible with my transform sequence.

I knew I couldn't be the only experimenting with swapping between formulae.

So far it appears that sequences that favour a given formula over the other give better results. The first formula dictates the overall shape of the picture for example swapping between the Mandelbrot and a Cubic Mandelbrot results in a ghostly outline of the standard Mandelbrot. I haven't save an example of this effect yet, when I do I'll add it to this thread.

Here is an other example using Quadratic:

z = transform(z)
z = alpha*z^2 + beta*z + c

A Transforms

top right, i.e. force both components of z to be positive

B Transforms

bottom right, i.e. force both components of z to be negative

Transform sequence: AAAB

Logged

Elelemt90 Fractals blog www.element90.wordpress.com
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #3 on: September 12, 2011, 05:57:20 PM »

cKleinhuls, your method only produces a subset of the sequences possible with my transform sequence.

it is just a subset i know wink but it is only 3 lines of code to implement more variance when you only have 2 formulas wink

to understand what is possible, with alternation/hybrid methods, make sure you understand that once an iteration has been escaped its form wont change in further iterations, this is the reason why the "1st" formula defines the overall shape

this effect can be understood best if you define an iteration when to swith it, this way you could display a fractal in the "black" area of another, but it is not leading to that interesting effects wink



to your method:

you know you have limitations as well ?

e.g. for a 24 iteration the sequence

"AAAABBBB" would look like:
"AAAABBBBAAAABBBBAAAABBBB"

the sequences could grow bigger, but at the end you are just modulo+iterating over the chars in the string if your iteration exceeds the string length ....
so, i like the way to define some kind of language ( perhaps branching would also make sense ... ) similar to the LSYSTEMs
http://de.wikipedia.org/wiki/Lindenmayer-System

Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #4 on: September 12, 2011, 06:07:48 PM »

additionally i believe it is getting more interesting at deeper zoom levels wink
Logged

---

divide and conquer - iterate and rule - chaos is No random!
element90
Strange Attractor
***
Posts: 298



WWW
« Reply #5 on: September 12, 2011, 06:20:21 PM »

I could add additional transform sets to my software, I'll continue with the 2 set version for the time being as I've only just scratched the surface of this class of fractals. At the moment all my formulae are coded in C++ in the main body of the program, at some point I'll have to investigate how to incorporate some sort of fractal programming language along the same lines as UF, Fractal Science Kit and others.

cKleinhuls, do you have any example pictures using your technique?
Logged

Elelemt90 Fractals blog www.element90.wordpress.com
yv3
Conqueror
*******
Posts: 149



WWW
« Reply #6 on: September 12, 2011, 10:03:02 PM »

Intresting approach, i must try this out! I thought about something similar before, i combined the mandelbrot and julia formula to a single one where both formulas take effect in a single iteration. This a sample rendering:

Desert Sunrise

full size image
A warm sunrise in a desert with a a starry sky. A beauty with long black hair lies beside you wink

another one

Addicted

full size image

greetings
Logged

Creator of yFract
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #7 on: September 13, 2011, 11:55:57 AM »

Intresting approach, i must try this out! I thought about something similar before, i combined the mandelbrot and julia formula to a single one where both formulas take effect in a single iteration. This a sample rendering:

there exist plenty of methods to create new formula ( e.g. spherical/polar interpolation of 2 different formula in one iteration )
adding/dividing/multiplying/subtracting is also easy to achieve and try out

you are right that implementing a hybrid in one single iter step leads to different results, i can imagine a formula editor that has checkboxes for each formula in the created hybrid that can be checked as ( bailout test ) so that "simple" formulas like adding/subtracting wouldnt lead to a bailout condition....  this way every form could be doable ...

i would love to see a drag&drop formula editor with simple operators to combine different fractal formula.... or create new ones

i would love to see a language that lets define a logic for at which iteration step wich formula to use ( similar ot the above "AAABAABA" style ) , i can think of many more hybrid options, like:
Base Formula would be A
"use formula X at Iteration Y"
"use formula X at Iteration Y1 to Y2"
"use formula X at every nth Iteration"
"if |z|<Y use formula X else use formula X2"


... and so on, some of these hybrids are available in my ultrafractal formula collection

remember that each formula can have its own variable settings...


in fact you could define a different formula at each iteration, but this would certainly lead to crappy results


gotta open up ultra fractals formula editor now ....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #8 on: September 15, 2011, 07:49:49 PM »

Here is an other example using Quadratic:

z = transform(z)
z = alpha*z^2 + beta*z + c

A Transforms

top right, i.e. force both components of z to be positive

B Transforms

bottom right, i.e. force both components of z to be negative

Transform sequence: AAAB

<Quoted Image Removed>

  This one produces a sort of "double" Burning Ship fractal.
Logged

tit_toinou
Iterator
*
Posts: 192


« Reply #9 on: January 14, 2012, 03:11:02 PM »

This is a good idea !
Don't forget that by doing this you are just changing the initial formulae : if you are doing AB with A: "z^2+c" and B: "z^2-c" it is just like iterating over "(z^2+c)^2-c".
Great images btw.
Logged

cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #10 on: January 14, 2012, 03:34:11 PM »

thats correct tit, but the alternation allows an easy set up of new formulas, as i stated earlier, in this approach it isnt neccesary to use different formulas, it is enough to use different parameters for the same formula, in this way transforms or pertubations are created that allow finer control over the deformations of the underlying formula, in fact with the alternation hybrid method it is possible to
create an arbitrary set of parameters that can be used to control the fractal ....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
hobold
Fractal Bachius
*
Posts: 573


« Reply #11 on: January 14, 2012, 07:24:02 PM »

It might be an option to use algorithmically specified sequences instead of fixed strings consisting of A and B. These can be aperiodic, and so avoid the problem that one really just iterates a larger, composited, function. For example the Thue-Morse-Sequence: http://en.wikipedia.org/wiki/Thue–Morse_sequence .
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.168 seconds with 24 queries. (Pretty URLs adds 0.011s, 2q)