Logo by Dinkydau - 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: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. November 21, 2018, 01:40:28 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: Strange, possibly unknown Mandelbrot variants.  (Read 3100 times)
0 Members and 1 Guest are viewing this topic.
matsoljare
Fractal Lover
**
Posts: 215



WWW
« on: October 16, 2008, 11:56:06 PM »

When modifying some QBasic programs that rendered the Mandelbrot set, i discovered some very simple changes to the algorithm that produced interesting results. I'm sure most of these are already known, as they are just too simple not to be, but i don't recognize seeing them (the resulting shapes) anywhere and they don't seem to be in the fractal programs i've tried either.

I'm sure there is a more "proper mathematical" way to express these, but i'm going with what it looks like in the program, and i hope it makes sense to you.

Consider the standard formula for squaring complex numbers as this:

xn = (x * x) - (y * y)
yn = 2 * x * y

I tried substituting the 2 with other numbers. -1, 1, 3 and 4 gives interesting results. -2, of course, gives the familiar "tricorn", but is there any proper names, or previous records of the others? What we're doing is basically multiplying the imaginary part of the number during iteration, without changing the real part. For example:

xn = (x * x) - (y * y)
yn = 1 * x * y

Another possibility is replacing the squaring with another function, such as Absolute:

xn = abs(x) - abs(y)
yn = 1 * x * y

Or changing either the X term, Y term or both for a higher power:

xn = (x * x * x) - (y * y)
yn = 2 * x * y

All in any combination, and don't miss that they also give interesting Julia sets!

So, is anyone here familiar with this kind of "unconventional" variants on the Mandelbrot formula? Are there any galleries of images generated with this kind of "bastardized" formulas?
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: October 17, 2008, 02:11:24 AM »

hm, those kind of calculations can also be achieved in ultrafractal5 or another software, you are right those
are interesting and easy modifications of the formula, but this all falls under fractal formulas in general, try them out in uf5 afro
Logged

---

divide and conquer - iterate and rule - chaos is No random!
matsoljare
Fractal Lover
**
Posts: 215



WWW
« Reply #2 on: November 07, 2008, 08:59:28 PM »

So any idea how i would go about with implementing those, in UF for example? I can probably make sense of the formulas themselves, but i don't know exactly what the configuration files are supposed to contain...
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #3 on: November 08, 2008, 03:45:12 PM »

So any idea how i would go about with implementing those, in UF for example? I can probably make sense of the formulas themselves, but i don't know exactly what the configuration files are supposed to contain...

The "ordinary" formula template is pretty straightforward - the formulas just go in plain text files but with the extension ".ufm" instead of ".txt".

The standard Mandelbrot looks like this at its simplest:

StandardMandelbrot {
;
; Standard Mandelbrot set.
;
init:
  z = @start
loop:
  z = z^@power + #pixel
bailout:
  |z| <= @bailout
default:
  title = "Standard Mandelbrot"
  center = (-0.5, 0)
  param start
    caption = "Starting point"
    default = (0,0)
    hint = "The starting point parameter can be used to distort the Mandelbrot \
            set. Use (0, 0) for the standard Mandelbrot set."
  endparam
  param power
    caption = "Power"
    default = (2,0)
    hint = "This parameter sets the exponent for the Mandelbrot formula. \
            Increasing the real part to 3, 4, and so on, will add discs to \
            the Mandelbrot figure. Non-integer real values and non-zero \
            imaginary values will create distorted Mandelbrot sets. Use (2, 0) \
            for the standard Mandelbrot set."
  endparam
  float param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
}

So if you change the above "loop:" section calculation to your funky formulas then you'd have your own formula - obviously you should think up your own name for it (often authors use names based on the shapes produced by the formula).

Note that ideally you should extend your formula to take advantage of Ultra Fractal's switch facility that allows switching to Julia Sets based on a position on the Mandelbrot.
There are two ways to do this - you can either write a separate Julia formula that the Mandelbrot switches to or you can write the one formula so it handles both Mandelbrot and Julia variations and switches to itself.
Here's an example of a formula that switches to itself:

MMFSa-Standard {
;
; Generic Mandelbrot set with extended switching.
; IMPORTANT NOTE - After switching by replacing
; the value of one of the parameters by the switched
; value if you wish to switch by replacing a DIFFERENT
; parameter with the switched value then you must
; first copy the current switched value into the
; parameter it is replacing.
;
; Created 21st April 2002
;
; ę David Makin 2002
;
init:
  complex px = #pixel

  if @usescale != 1.0
    px = px/@usescale
  endif
  if @usecentre != (0,0)
    px = px + @usecentre
  endif

  complex z = @start
  complex c = @c
  complex s = @s
  complex p = @p*4
  complex m = @m
  complex n = @n

  if @mjmode<5
    z = @value
  elseif @mjmode<10
    c = @value
  elseif @mjmode<15
    s = @value
  elseif @mjmode<20
    p = @value*4
  elseif @mjmode<25
    m = @value
  elseif @mjmode<30
    n = @value
  endif

  if @mjmode==5 || @mjmode==10 || @mjmode==15 || @mjmode==20 || @mjmode==25
    z = px
  elseif @mjmode==0 || @mjmode==11 || @mjmode==16 || @mjmode==21 || @mjmode==26
    c = px
  elseif @mjmode==1 || @mjmode==6 || @mjmode==17 || @mjmode==22 || @mjmode==27
    s = px
  elseif @mjmode==2 || @mjmode==7 || @mjmode==12 || @mjmode==23 || @mjmode==28
    p = px*4
  elseif @mjmode==3 || @mjmode==8 || @mjmode==13 || @mjmode==18 || @mjmode==29
    m = px
  elseif @mjmode==4 || @mjmode==9 || @mjmode==14 || @mjmode==19 || @mjmode==24
    n = px
  endif

  float x = real(z)
  float y = imag(z)
  float t = x
  complex zold = (0,0)
  complex zo = zold
  complex zs = (0,0)
  complex zp = (1,0)
  float ang = #pi*@ang/180.0
  float ca = cos(ang)
  float sa = sin(ang)
  float r0c0 = real(m)*ca-real(n)*sa
  float r0c1 = real(m)*sa+real(n)*ca
  float r1c0 = imag(m)*ca-imag(n)*sa
  float r1c1 = imag(m)*sa+imag(n)*ca
  bool bail = true

loop:
  zo = zold
  zold = z

  if @sigma == true
    z=z+zs
    zs=z
  endif

  if |z|>0 && @product == true
    z = z*zp
    zp = z
  endif

  z = @fn1(z)

  if @selfrot > 0
    t = cabs(z)
    if t > 0
      z = z*z/t
    endif
    if @selfrot == 2
      z = z + px
    endif
  endif

  x = real(z)
  y = imag(z)
  t = x
  x = x*r0c0 + y*r1c0
  y = t*r0c1 + y*r1c1
  z = x + flip(y)

  if @fractal == 0
    z = s*z^p + c
  elseif @fractal == 1
    z = s*z^p + zo + c
  elseif @fractal == 2
    z = s*zo*z^p + c
  endif

  if @smallbail == true && |z-zold| < @bailout1
    bail = false
  endif

bailout:
  bail && ((@test == 0 && |z| <= @bailout) ||                                \
  (@test == 1 && sqr(real(z)) <= @bailout) ||                                \
  (@test == 2 && sqr(imag(z)) <= @bailout) ||                                \
  (@test == 3 && (sqr(real(z)) <= @bailout && sqr(imag(z)) < @bailout)) ||   \
  (@test == 4 && (sqr(real(z)) <= @bailout || sqr(imag(z)) < @bailout)) ||   \
  (@test == 5 && (sqr(abs(real(z)) + abs(imag(z))) <= @bailout)) ||          \
  (@test == 6 && (sqr(real(z) + imag(z)) <= @bailout)) ||                    \
  (@test == 7 && (abs(sqr(real(z))/imag(z)) <= @bailout)) ||                 \
  (@test == 8 && (abs(sqr(imag(z))/real(z)) <= @bailout)) ||                 \
  (@test == 9 && (sqr(real(z))/imag(z) <= @bailout)) ||                      \
  (@test == 10 && (sqr(imag(z))/real(z) <= @bailout)))

default:
  title = "Switch Standard"
  center = (-0.5, 0)
  method = multipass
  periodicity = 0
  param value
    caption = "Switched value"
    default = (0,0)
    hint = "This is the value passed using the switch function. \
            After switching it should be copied into the parameter \
            that was replaced using the switch (before you use the \
            switch again replacing a different parameter)."
  endparam
  param start
    caption = "Start z"
    default = (0,0)
    hint = "The starting z value for the Mandelbrot modes. \
            Used in all modes except the 'J' ones, or the \
            (Zstart) ones."
  endparam
  param c
    caption = "Constant"
    default = (0.5,0)
    hint = "The constant c in s*z^p+c, used in all modes except the 'Mc' ones \
            or the (Constant) ones."
  endparam
  param s
    caption = "Scale"
    default = (1,0)
    hint = "The scale s in s*z^p+c, used in all modes except the 'Ms' ones \
            or the (Scale) ones."
  endparam
  param p
    caption = "Power/4"
    default = (0.5,0)
    hint = "The power p/4 in s*z^p+c, used in all modes except the 'Mp' ones \
            or the (Power) ones). \
            The actual exponent used is 4* the displayed value - this \
            is to allow a better range of values for switching."
  endparam
  param fractal
    caption = "Fractal type"
    default = 0
    enum = "s*z^p+c" "s*z^p+zold+c" "s*zold*z^p+c"
    hint = "Choose the classic standard Mandelbrot, the classic 'Manowar' or \
           the third option which uses zold like Manowar but multiplies by it \
           instead of adding it."
  endparam
  param m
    caption = "Matrix col 0 (m)"
    default = (1,0)
    hint = "Column 0 of a generalised \
            transformation matrix - use (1,0) \
            for the identity matrix. Used in all \
            modes except the 'Mm' ones or the (Matrix m) ones."
  endparam
  param n
    caption = "Matrix col 1 (n)"
    default = (0,1)
    hint = "Column 1 of a generalised \
            transformation matrix - use (0,1) \
            for the identity matrix. Used in all \
            modes except the 'Mn' ones or the (Matrix n) ones."
  endparam
  param ang
    caption = "Rotation (degrees)"
    default = 0.0
    hint = "Rotational transformation applied at each \
            iteration. Really only signficant when First \
            function is not ident."
  endparam
  param sigma
    caption = "Iterate the sum"
    default = false
    hint = "When enabled instead of z1=f(z0), z2=f(z1), z3=f(z2) etc. \
            z1=f(z0), z2=f(z0+z1), z3=f(z0+z1+z2) etc. "
  endparam
  param product
    caption = "Iterate the product"
    default = false
    hint = "When enabled instead of z1=f(z0), z2=f(z1), z3=f(z2) etc. \
            z1=f(z0), z2=f(z0*z1), z3=f(z0*z1*z2) etc. The process is \
            fudged slightly if zn is zero at any time."
  endparam
  param selfrot
    caption = "Self-rotation"
    default = 0
    enum = "Disabled" "Enabled" "Plus c"
    hint = "When enabled z is rotated by atan2(z) at the start of each iteration. \
            Plus c does the same but also adds #pixel to the rotated value, it's \
            only here as it produces some interesting results."
  endparam
  param test
    caption = "Bailout Test"
    default = 0
    enum = "mod" "real" "imag" "or" "and" "manh" "manr" "abs(x*x/y)" \
           "abs(y*y/x)" "x*x/y" "y*y/x"
    hint = "Modifies the divergent bailout test condition, some modes \
            will require smaller bailout values to produce a good effect. \
            'x*x/y' and 'y*y/x' were added for MMFrac compatibility."
  endparam
  param bailout
    caption = "Bailout value"
    default = 65536.0
    min = 1.0
    hint = "Defines how soon an orbit bails out, i.e. doesn't belong \
            to the Mandelbrot set anymore."
  endparam
  param smallbail
    caption = "Convergence"
    default = false
    hint = "Enables or disables convergence testing."
  endparam
  param bailout1
    caption = "Small bailout"
    default = 1e-5
    hint = "Bailout for detecting convergence."
  endparam
  param usescale
    caption = "Current scale adjust"
    default = 1.0
    hint = "Used for switching in combination with the Switch scale adjust. \
            After switching you should really set this value back to 1.0."
  endparam
  param usecentre
    caption = "Current centre adjust"
    default = (0,0)
    hint = "Used for switching in combination with the Switch centre adjust. \
            After switching you should really set this value back to (0,0)."
  endparam
  param swscale
    caption = "Switch scale adjust"
    default = 1.0

    hint = "Used for switching in combination with the Current scale adjust. \
            Modify the value to zoom the switch preview. 0<values<1.0 will \
            reduce the switch, values>1.0 will magnify the switch. Particularly \
            useful for finding interesting small Julias."
  endparam
  param swcentre
    caption = "Switch centre adjust"
    default = (0,0)
    hint = "Used for switching in combination with the Current centre adjust. \
            Modify the value to centre the switch preview. Particularly useful \
            for finding interesting small Julias."
  endparam
  param mjmode
    caption = "Current mode"
    default = 0
    enum = "Mc(Zstart)" "Ms(Zstart)" "Mp(Zstart)" "Mm(Zstart)" "Mn(Zstart)" \
           "J(Constant)" "Ms(Constant)" "Mp(Constant)" "Mm(Constant)" "Mn(Constant)" \
           "J(Scale)" "Mc(Scale)" "Mp(Scale)" "Mm(Scale)" "Mn(Scale)" \
           "J(Power)" "Mc(Power)" "Ms(Power)" "Mm(Power)" "Mn(Power)" \
           "J(Matrix m)" "Mc(Matrix m)" "Ms(Matrix m)" "Mp(Matrix m)" "Mn(Matrix m)" \
           "J(Matrix n)" "Mc(Matrix n)" "Ms(Matrix n)" "Mp(Matrix n)" "Mm(Matrix n)"
    hint = "Works for switching in combination with the Switch to parameter. \
            The item in brackets indicates which parameter is \
            replaced by the switched value. The J modes are where \
            #pixel is used as Zstart and n in Mn indicates how #pixel \
            is used otherwise."
  endparam
  param swmode
    caption = "Switch using"
    default = 5
    enum = "Mc(Zstart)" "Ms(Zstart)" "Mp(Zstart)" "Mm(Zstart)" "Mn(Zstart)" \
           "J(Constant)" "Ms(Constant)" "Mp(Constant)" "Mm(Constant)" "Mn(Constant)" \
           "J(Scale)" "Mc(Scale)" "Mp(Scale)" "Mm(Scale)" "Mn(Scale)" \
           "J(Power)" "Mc(Power)" "Ms(Power)" "Mm(Power)" "Mn(Power)" \
           "J(Matrix m)" "Mc(Matrix m)" "Ms(Matrix m)" "Mp(Matrix m)" "Mn(Matrix m)" \
           "J(Matrix n)" "Mc(Matrix n)" "Ms(Matrix n)" "Mp(Matrix n)" "Mm(Matrix n)"
    hint = "Works for switching in combination with the Current mode parameter. \
            After switching the Switched value parameter is used instead of the \
            parameter in brackets and should be copied into that parameter before \
            switching a different parameter - see the hints for Current mode."
  endparam
  func fn1
    caption = "First function"
    default = ident()
    hint = "Try using Conj or Flip."
  endfunc

switch:
  type = "MMFSa-Standard"
  value = #pixel
  start = start
  c = c
  s = s
  p = p
  fractal = fractal
  m = m
  n = n
  ang = ang
  sigma = sigma
  product = product
  selfrot = selfrot
  test = test
  bailout = bailout
  smallbail = smallbail
  bailout1 = bailout1
  usescale = swscale
  usecentre = swcentre
  swscale = swscale
  swcentre = swcentre
  mjmode = swmode
  swmode = swmode
  fn1 = fn1
}

Note that the above allows viewing of the formula in many different ways.


Also see the help for writing formulas that's built into Ultra Fractal as it is pretty comprehensive.
Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
matsoljare
Fractal Lover
**
Posts: 215



WWW
« Reply #4 on: November 08, 2008, 07:37:40 PM »

Wow, i'll have to look through this later. I would also be very thankful if someone with more knowledge about programming would try to implement the rendering i suggested in this thread:

http://www.fractalforums.com/new-theories-and-research/supermandelbrot-and-superjulia-imaging/
Logged
lkmitch
Fractal Lover
**
Posts: 238



« Reply #5 on: November 13, 2008, 01:02:30 AM »

Wow, i'll have to look through this later. I would also be very thankful if someone with more knowledge about programming would try to implement the rendering i suggested in this thread:

http://www.fractalforums.com/new-theories-and-research/supermandelbrot-and-superjulia-imaging/

See the variation that I posted there.

Kerry
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Wikipedia article on the Mandelbrot set, and my 3D variants Mandelbrot & Julia Set Duncan C 0 2346 Last post July 16, 2008, 10:43:09 PM
by Duncan C
A very strange idea; vector to the Mandelbrot Let's collaborate on something! Timeroot 8 2576 Last post January 23, 2010, 07:44:58 AM
by Timeroot
Mandelbrot Safari LXIX: Species Unknown Images Showcase (Rate My Fractal) Pauldelbrot 0 366 Last post June 22, 2013, 08:39:39 PM
by Pauldelbrot
Strange Mandelbrot Set Mandelbrot & Julia Set « 1 2 » Endemyon 18 2031 Last post June 12, 2014, 11:38:36 PM
by David Makin
Sierpinski variants Sierpinski Gasket matsoljare 1 261 Last post November 15, 2016, 11:00:03 PM
by DarkBeam

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.174 seconds with 28 queries. (Pretty URLs adds 0.009s, 2q)