Alternating Formula

From Ultrafractal Wiki

Jump to: navigation, search

Alternating Formula is a Fractal Formula by Christian Kleinhuis in ck.ucl.


Examples for the use of the Alternating Formula


Contents

The Beginning

Start With a clean Alternating fractal.


Image:Alternating_Formula_1.jpg


AlternatingFormula_1 {
fractal:
  title="Alternating Formula_1" width=600 height=450 layers=1
  credits="Don Berendsen;1/21/2009;c.Kleinhuis;1/20/2009"
layer:
  caption="Background" opacity=100
mapping:
  center=-0.32/0.026666667 magn=1
formula:
  maxiter=100 filename="Standard.ufm" entry="GenericFormula"
  p_formulaClass="ck.ulb:AlternatingFormulaObject"
  p_formulaClass.v_generic=100 p_formulaClass.v_formula=100
  p_formulaClass.p_power=2/0
  p_formulaClass.formulaClass1="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass1.v_generic=100
  p_formulaClass.formulaClass1.v_formula=100
  p_formulaClass.formulaClass1.v_divergentformula=100
  p_formulaClass.formulaClass1.start=0/0
  p_formulaClass.formulaClass1.p_power=2/0
  p_formulaClass.formulaClass1.p_bailout=4
  p_formulaClass.formulaClass2="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass2.v_generic=100
  p_formulaClass.formulaClass2.v_formula=100
  p_formulaClass.formulaClass2.v_divergentformula=100
  p_formulaClass.formulaClass2.start=0/0
  p_formulaClass.formulaClass2.p_power=2/0
  p_formulaClass.formulaClass2.p_bailout=4
inside:
  transfer=none
outside:
  transfer=linear
gradient:
  comments="Default Ultra Fractal gradient." smooth=yes index=0
  color=8716288 index=100 color=16121855 index=200 color=46591
  index=300 color=156
opacity:
  smooth=no index=0 opacity=255
}



First Steps

Play Around with the Parameters of the SECOND function, you will notice that the Starting Position has no effect on the shape, which is clear because the start value is only applied in the FIRST iteration, but play with the power variable.


Image:Alternating_Formula_2.jpg


AlternatingFormula_2 {
fractal:
  title="Alternating Formula_2" width=600 height=450 layers=1
  credits="Don Berendsen;1/21/2009;c.Kleinhuis;1/20/2009"
layer:
  caption="Background" opacity=100
mapping:
  center=-0.486666667/-1.000000000000000000000000000000000000000000000\
  0000000000000000000000000000000003e-9 magn=1
formula:
  maxiter=100 filename="Standard.ufm" entry="GenericFormula"
  p_formulaClass="ck.ulb:AlternatingFormulaObject"
  p_formulaClass.v_generic=100 p_formulaClass.v_formula=100
  p_formulaClass.p_power=2/0
  p_formulaClass.formulaClass1="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass1.v_generic=100
  p_formulaClass.formulaClass1.v_formula=100
  p_formulaClass.formulaClass1.v_divergentformula=100
  p_formulaClass.formulaClass1.start=0/0
  p_formulaClass.formulaClass1.p_power=2/0
  p_formulaClass.formulaClass1.p_bailout=4
  p_formulaClass.formulaClass2="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass2.v_generic=100
  p_formulaClass.formulaClass2.v_formula=100
  p_formulaClass.formulaClass2.v_divergentformula=100
  p_formulaClass.formulaClass2.start=2.78477/1.25531
  p_formulaClass.formulaClass2.p_power=1.04769/-0.28857
  p_formulaClass.formulaClass2.p_bailout=4
inside:
  transfer=none
outside:
  transfer=linear
gradient:
  comments="Default Ultra Fractal gradient." smooth=yes index=0
  color=8716288 index=100 color=16121855 index=200 color=46591
  index=300 color=156
opacity:
  smooth=no index=0 opacity=255
}

First Real Alternation

Add Another Fractal Type, be creative, I just chose a Julia Mandelbrot.


Image:Alternating_Formula_3.jpg


AlternatingFormula_3 {
fractal:
  title="Alternating Formula_3" width=600 height=450 layers=1
  credits="Don Berendsen;1/21/2009;c.Kleinhuis;1/20/2009"
layer:
  caption="Background" opacity=100
mapping:
  center=-0.98/0 magn=1
formula:
  maxiter=100 filename="Standard.ufm" entry="GenericFormula"
  p_formulaClass="ck.ulb:AlternatingFormulaObject"
  p_formulaClass.v_generic=100 p_formulaClass.v_formula=100
  p_formulaClass.p_power=2/0
  p_formulaClass.formulaClass1="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass1.v_generic=100
  p_formulaClass.formulaClass1.v_formula=100
  p_formulaClass.formulaClass1.v_divergentformula=100
  p_formulaClass.formulaClass1.start=0/0
  p_formulaClass.formulaClass1.p_power=2/0
  p_formulaClass.formulaClass1.p_bailout=4
  p_formulaClass.formulaClass2="Standard.ulb:Standard_Julia"
  p_formulaClass.formulaClass2.v_generic=100
  p_formulaClass.formulaClass2.v_formula=100
  p_formulaClass.formulaClass2.v_divergentformula=100
  p_formulaClass.formulaClass2.seed=-1.25/0
  p_formulaClass.formulaClass2.p_power=2/0
  p_formulaClass.formulaClass2.p_bailout=4.0
inside:
  transfer=none
outside:
  transfer=linear
gradient:
  comments="Default Ultra Fractal gradient." smooth=yes index=0
  color=8716288 index=100 color=16121855 index=200 color=46591
  index=300 color=156
opacity:
  smooth=no index=0 opacity=255
}


First Examination

Now play with the new Julia Parameters, this time every parameter affects the outcome, this is also clear because the Julia formula is initialised with the current pixel value, and in each iteration step the seed is added to the current z value, hence the affect ....


Image:Alternating_Formula_4.jpg


AlternatingFormula_4 {
fractal:
  title="Alternating Formula_4" width=600 height=450 layers=1
  credits="Don Berendsen;1/21/2009;c.Kleinhuis;1/20/2009"
layer:
  caption="Background" opacity=100
mapping:
  center=-1.0800000001/-0.006666667 magn=1
formula:
  maxiter=100 filename="Standard.ufm" entry="GenericFormula"
  p_formulaClass="ck.ulb:AlternatingFormulaObject"
  p_formulaClass.v_generic=100 p_formulaClass.v_formula=100
  p_formulaClass.p_power=2/0
  p_formulaClass.formulaClass1="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass1.v_generic=100
  p_formulaClass.formulaClass1.v_formula=100
  p_formulaClass.formulaClass1.v_divergentformula=100
  p_formulaClass.formulaClass1.start=0/0
  p_formulaClass.formulaClass1.p_power=2/0
  p_formulaClass.formulaClass1.p_bailout=4
  p_formulaClass.formulaClass2="Standard.ulb:Standard_Julia"
  p_formulaClass.formulaClass2.v_generic=100
  p_formulaClass.formulaClass2.v_formula=100
  p_formulaClass.formulaClass2.v_divergentformula=100
  p_formulaClass.formulaClass2.seed=1/0
  p_formulaClass.formulaClass2.p_power=2/0
  p_formulaClass.formulaClass2.p_bailout=4.0
inside:
  transfer=none
outside:
  transfer=linear
gradient:
  comments="Default Ultra Fractal gradient." smooth=yes index=0
  color=8716288 index=100 color=16121855 index=200 color=46591
  index=300 color=156
opacity:
  smooth=no index=0 opacity=255
}


Second Examination

Now for a little experiment, set the Power Value to 1/0 and the Seed Value to 0/0, suprise surprise, the Mandelbrot, if we examine the formula further, this time it is also clear what happens, the z value is multiplied by one, and we add zero, hence no affect ... but it has an effect on rendering time, doing such calculations are hard to get optimized out by the compiler.


Image:Alternating_Formula_5.jpg


AlternatingFormula_5 {
fractal:
  title="Alternating Formula_5" width=600 height=450 layers=1
  credits="Don Berendsen;1/21/2009;c.Kleinhuis;1/20/2009"
layer:
  caption="Background" opacity=100
mapping:
  center=-0.54/0 magn=1
formula:
  maxiter=100 filename="Standard.ufm" entry="GenericFormula"
  p_formulaClass="ck.ulb:AlternatingFormulaObject"
  p_formulaClass.v_generic=100 p_formulaClass.v_formula=100
  p_formulaClass.p_power=2/0
  p_formulaClass.formulaClass1="Standard.ulb:Standard_Mandelbrot"
  p_formulaClass.formulaClass1.v_generic=100
  p_formulaClass.formulaClass1.v_formula=100
  p_formulaClass.formulaClass1.v_divergentformula=100
  p_formulaClass.formulaClass1.start=0/0
  p_formulaClass.formulaClass1.p_power=2/0
  p_formulaClass.formulaClass1.p_bailout=4
  p_formulaClass.formulaClass2="Standard.ulb:Standard_Julia"
  p_formulaClass.formulaClass2.v_generic=100
  p_formulaClass.formulaClass2.v_formula=100
  p_formulaClass.formulaClass2.v_divergentformula=100
  p_formulaClass.formulaClass2.seed=0/0
  p_formulaClass.formulaClass2.p_power=1/0
  p_formulaClass.formulaClass2.p_bailout=4.0
inside:
  transfer=none
outside:
  transfer=linear
gradient:
  comments="Default Ultra Fractal gradient." smooth=yes index=0
  color=8716288 index=100 color=16121855 index=200 color=46591
  index=300 color=156
opacity:
  smooth=no index=0 opacity=255
}


Third Examination

One last word about the Julia, if we set the Julia power to 2,0 and the seed to 0,0, we get a figure looking like a Mandelbrot^4 Fractal. But if we put those two fractals above each other and subtract, we see they are not the same, if I find the time I will write it down...

just compare the two versions of the Mandelbrot


Image:Alternating_Formula_6.jpg


AlternatingFormula_6 {
::LYP3yhn2VT1yutNMQw7GQ/DE6elJpsUsSAP00iUg+A9QRPbQLtSmNUkCUUJx/9l6htljVdiD
  6hWADYRu7s7oRzu5GeqlLv2bGCZFWJw8fv0CGF3KUFo70myGJfVsP6RRmdDLGjRbARxGLLy9
  okvFM1MaL8UDkJs1M/PqVobBDoyqB1Nk5U3PMO5m0gvIBhaTjou9Wc3t+ez6KSHDS5VWhWx8
  /a7VIiPSXxTF2tMirZlgpAK1ZAbtsB8mVyrqcksHJocsm9OcAOiEeVyirijm7OQDp44lhhRo
  SehiRCoJxJhYi3s8+XtO0l8nEtwb7SuQCKepTI+hlry4msgm8SfkrBmtM/PBKwISHEG/W0Vr
  Gq1Hk866x4krve3hVfz9PIXb02JAF8wqi+C3xhTCOcsN4kgzEP0KOK7oEfeW1WuxywznqCVr
  q0P6EgFzxnGaNXI1NW2CvZCVtID6dLGuqO3hRpVuPGuEONkUoAuxbWhhnJcsr/Tlus09crRB
  y5NSL6nSHC0d9WR0ukD8R1latz0tFqRCn69ED3XAp2wWeFJmuc5Qg233+7JxEKZZU0QA6+AL
  ijSIt47DEeARUsj/9GtOGO0WleXX3bDpRRT6XvlnefhR3oy+/0ymefnZd0o/Q2ff9vg0/+O2
  d+N6kuxxHIvt5pjKxxc9Vk95J/zzeqhvXE25mGPOzLQrOeY9s5S/T66nbkC+LJp0LSSpXkkS
  fbSKNoGgsXhiSvAFlOWRDw/DvAMZ32s4oow9L/IkxL/Os57QVu0lf/2tOqrm
}


Add Another Alternation

This time we get really funny, you will see that there is no limit in creating hierarchical fractal alternating formulas with the weirdest results. I will add another alternation formula in the second slot. Let's see what happens oh, and I used a Phoenix and a Nova Formula for Alternation.


Image:Alternating_Formula_7.jpg


AlternatingFormula_7 {
::iq1urhn2VbVXvtNIU03jU+Pg87zBIBHnWxDrbrTaf0Npp92kiI2EHWxgFGn28vfgtTb+qdxu
  9hNrIZD375cvcvHIs0wSsM5FDHAAWhVypBvVa5GFzKUZgr1m8KJb+0AwdiU7KaEECWxFZrsU
  i7TJbD3USxe4JGeqwWSDevWBuib4q0Su6S0Is7HEO7ykwPL5C1qKRpfWY9sBDHUTSdGkwKsC
  tiG8F/UAUAQXwSE2NUkLYrFliFuMUpB5cTGPXnypLkV8hDyZFFu8thEuytAovBGSmMZMKOKe
  6I3AIiQgRzmAJgcWmiiCRoI80Y0wBLbWl1ozZ3L8w9BcpQyVscXN5HWmKlZSDrWmHAcBwshG
  8RuibEJt1oAP6i5tc9OJrscXcyFXsdw8v6ezlLMa7JAFueeWDx15wRGbH6NeSwpi1+ijyujj
  H6VplZsU4oTxQx8C9duCwkRwjNtgJk6KLdywBCVpIl3IcMMV5SHGlW5aGOHO2kUo4MzwBZGW
  qwldNtKdeu7bvmhvkVJtgfKdIAX3oKBbdOMAUmr1O93GeJQ4qe3ThNEI1Ga8UXnMOu1gf92M
  PKChRxESrB8DGmERmh84bMM+REkIX+3o5qzw2w6kctR9BFJmQOp09KWytZGdlKdf17/LS2kb
  rFr7cKQr3fbxv5Jv+K2t6N8JVj7OA1v9T7Rx+56Z49zn8H69p289Xh9c7G33zOUr2fz6z6Lu
  XN99YoTlVcnKr4Osqxnne5G9v8Etm9pKpgF0BG746s/ipjxmoVdWbdILlce6ZI0wPhsbcPQu
  VE6ONz9g6IeDXycno3x4ifqG/3XV341cl4+mDNC6Gxvg+P+F0/x97olDJ5cPoB/KtB0h0jD3
  jQ6+32qEvqh0jsdrmDFC/AG+P8VVmt9eHREy4HumCCt71Ue8OKPySXvmyfwIjxQ8
}


Have Fun

ok, last step is play around with the parameters....


Image:Alternating_Formula_8.jpg


AlternatingFormula_8 {
::do/ntjn2VbVTPuNIQ07RK/HQ+edAcwxZXxhutdrU/Wqq3qUExm4QXMEhxZ38vvgtT28Vzu2b
  P0GZpYYm3bGGegnFGWqlJva4AAwKsSON41SL3oYWhKHcr2UUJZzSCA3LysLpxQIYJXkv0W/q
  kthbKpYP8UDPTYLpBvVrA3wNcVWJXdNaE29AhTvON8jSuQtsSU6nFWPbwwB1kUnBpsVWhWRD
  +kfKAKAoXxSF2NUkLYrFli5uMUpBFcTOvQnxpzlV8hDKYrW5y3GS4K3CgCDjIJYYS0UCa0rg
  hEUUcsbiICBUwyVUMMEmQIRTGOYRzysGeB7BhHvPiLESuiV4KKf3yUZMTWY1iiAgLCmN0g3z
  VcjIttIF4RvaWLXvRyKL3Hnc+VbHM7zu/5y5Gt9MgCXPLvh46c4EjtD9GPL4Mxaf1RZ3zxj9
  q0yMWKc05YY1sV67dFgxjgnaaOTI1VW64hDEqSRGvR5YYqyFOMKtytb4c4UTShizMDHkbYZC
  X21sXpLKcv7FN8FsKpF8DpDB42GZJYrzhBgyCt2JA3wLBCX17BKshAp2QTmgixJJtG8r3m5R
  xIMytH3aAvzw4YyUkHfjhoHRQid5fjorODbDrTz1G1dSSMhcWt7Ns07yN6KV2hy3/b0sp3Vr
  W37egWv/68fxT/7LZ3K4wnVOu/AU/OQdAFHmrPDvvcyfs3n703TCr94YIeyYEZEMcykpo4nE
  VHqbHey9i+i7lA4AG6UJG3pSMuDra8zT78F9P9Etm9hKpgF0BG746s/CrTxmqVdWndMLlceG
  1fhSMZiT0hwTTi7IFb3Mi66mxeCSXG4+h6IeDXycX13x4i/TigvtsWEo5KxDNXmE0NifBaB8
  LQLg73VOHTyl6H4S467hRHSPOcPCp7zwVpeVDpHZ7WNHKE+OM8f4eYmuthkY3X731/CCtf/L
  P28yjs01+X+NufsEKB==
}




What next ?

  • So, you saw you can combine the existing formulas in many new ways, this is especially interesting if you want to do animations, as you saw in one of the examples above, animating a parameter which converts a fractal into another one can lead to very exciting results.
  • The Order of the Alternation is a bit hard to track down, but the deeper the leaf formula nodes, the less often this formula is taken ...
  • Combining the same types of fractals always can produce an image as if it is the formula alone ( good start for animations )
  • Combination of Divergent/Convergent formulas can also lead to weird results, the method is, that the last formula which is taken in the iteration loop is deciding when to bailout, and you should now that those method use a somehow opposite method in determining the break of calculation.


See Also Blend Formula

Personal tools