Welcome to Fractal Forums

Fractal Software => Fractal Programs => Topic started by: Alef on November 26, 2012, 09:18:56 AM




Title: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on November 26, 2012, 09:18:56 AM
I was trying to implement Buddhabrot in Ultra Fractal.
Objectives were: 1 - to have more control over colours than in free buddhabrot renderers, 2 - to have more colour effects than UF single channel colour buddhabrots using gradient, 3 - to have more formulas to play width, 4 - to have something new, 5 - smoothness and 6 - speed.

Mostly I just used code from Susan D. Chambless Buddhabrot IV, becouse it is working, throught only 1 channel.

Partialy objectives are achieved, it have colours and formulas and new thing is limit being low iteration number, but it have certain problems:

Buddhabrot sample density is limited to 31690. If I use larger sample density, say 31691, it simply ceases to render and on screen shows colour of zero index. Is this becouse of some Ultra Fractal limitations of arrays or becouse of not enought memory?

Second  problem is zoom, when zooming in by just few clicks it allways looses density to almoust zero. This can be owercomed by much higher sample density, but then it becomes extremely slow. Maybe something must be done with source pixels?

Third, random number generator is not enought random. Throught it can have cool spiral orbits, but with same seed it don't looks random at all.


Maybe Buddhabrot naturaly would go with classes. Throught not all formulas goes with buddhabrot, and not all formulas with buddhabrot have interesting mandelbrot set and probably without .ulb it is faster and classes aren't very user friendly.

Formula is like this:
Code:
Moshiahobrot {
;code mostly taken from Susan D. Chambless buddhabrot.

$DEFINE DIRECT
global:

float antilightR=1/@lightR
float antilightG=1/@lightG
float antilightB=1/@lightB
  int seed =  random(777)  ; Seed for random numbers
  ; for colours
    float dataR=1
    float dataG=1
    float dataB=1

    int pwid = trunc(#width)
    int phgt = trunc(#height)
  
  ;3 arrays for RGB
  float pixR[trunc(#width),trunc(#height)]  ; offscreen image
  float pixG[trunc(#width),trunc(#height)]  ; offscreen image
  float pixB[trunc(#width),trunc(#height)]  ; offscreen image

  complex locations[@maxiter]       ; collect locations
  int cnt = 0                         ; Loop counters
  int x = 0, int y = 0              ; Loop counters & integer coords
  float xc =  real(#center)         ; Scaling constants
  float yc = -imag(#center)
  float sina = sin(#angle)
  float cosa = cos(#angle)
  float transx = pwid * 0.5
  float transy = phgt * 0.5
  
  float srcMinX = - (@srcWidth * 0.5)
  float srcMinY = - (@srcHeight * 0.5)
  float  scale = (#height * #magn) / 3*(@sizescaling)

  
; Initialize arrays of RGB pixels
  while x < #width
    y = 0
    while y < #height
      pixR[x, y] = @ambient
      pixG[x, y] = @ambient
      pixB[x, y] = @ambient
      y = y + 1
    endwhile
    x = x + 1
  endwhile    
 
  ; Main iteration loop
  int nsamples = round(#width * #height* #magn * @sampleDensity)
  int tenth = round(nsamples / 10)
  cnt = 0
  
  while cnt < nsamples
    ; generate random integers (-#randomrange to #randomrange)
    int irandX1 = seed = random(seed)
    int irandY1 = seed = random(seed)

    ; convert to random float numbers
    float srcX1 = (abs(irandX1) / #randomrange)*@srcWidth + srcMinX
    float srcY1 = (abs(irandY1) / #randomrange)*@srcHeight + srcMinY

    ; Mandelbrot set with random c value
    complex z = 0
    complex c = srcX1 + flip(srcY1)


    ; iteration count and true modulus, this don't need large bailout
    int iter = 0
    while (cabs(z) < 4) && (iter < @maxIter)
  

IF (@formula ==0)
z= z^@power +c
ELSEIF (@formula ==1)
z= z^@power/(z^(@power-1)+1) +c
ELSEIF (@formula ==2)
z= z*0.5 - z^@starpower + c
ELSEIF (@formula ==3)
z= conj(z^@power)+c
ELSEIF (@formula ==4)
z=abs(z*z*z)+c
ELSEIF (@formula ==5)
z=sqr(z)
z=(z^8+z^8)^0.125+c
ELSEIF (@formula ==6)
z=z^@power+c
z= z/cabs(z)*@unitvector +z
ELSEIF (@formula ==7)
       float zx=real(z)
       float zy=imag(z)
z= sqr(zx) + sqr(zy)+ flip(2.5*zx*zy) + c
ELSEIF (@formula ==8)
z = z^@power
z = z - real(z) + abs(real(z)) - c
ELSEIF (@formula ==9)
z=z^@power+c
z=sqr(z)/cabs(z)
ELSEIF (@formula ==10)
z = sqr(z) + (z+c)*z*z - sin(z+1) + c
ELSEIF (@formula ==11)
z= ((((z^3*c+1i)^3)+1i)^3)+1i
ENDIF

        locations[iter] = z
      
      iter = iter + 1
    endwhile
    
      int locindex = 2 ;for background contrast starts with 1.

      while( locIndex < iter )
      cnt = cnt+1
      
        float dx =  real( locations[locIndex] ) - xc
        float dy =  imag( locations[locIndex] ) - yc

      ; Scale to image
        x = round((dx*cosa - dy*sina) * scale + transx)
        y = round((dx*sina + dy*cosa) * scale + transy)

      ; Plot the point only if inside image
        if x >= 0 && x < pwid && y >= 0 && y < phgt

        ;colours calculated as RGB waves
         dataR =  (dataR +recip(sqrt(cnt)) )/( @scalarR + abs(pixR[x, y])*antilightR)
         dataG =  (dataG +recip(sqrt(cnt)) )/( @scalarG + abs(pixG[x, y])*antilightG)
         dataB =  (dataB +recip(sqrt(cnt)) )/( @scalarB + abs(pixB[x, y])*antilightB)

            pixR[x, y] = pixR[x, y] + dataR
            pixG[x, y] = pixG[x, y] + dataG
            pixB[x, y] = pixB[x, y] + dataB

        endif
        locIndex = locIndex + 1

        if (@progress==true && cnt%tenth == 0)
$define DEBUG
          print(round(cnt/nsamples*100), " percent")
        endif

      endwhile

  endwhile


;now formula will go throught pixels.
init:
int xcrd = 0
int ycrd = 0
float resultR = 0
float resultG = 0
float resultB = 0
float resultAlpha=0

final:
  xcrd = #x
  ycrd = #y
resultR = abs(pixR[xcrd, ycrd])
resultG = abs(pixG[xcrd, ycrd])
resultB = abs(pixB[xcrd, ycrd])

 ; switching red and blue.
IF (@switchRB==true)
  resultAlpha=resultB
resultB=resultR
resultR=resultAlpha
  ENDIF


;colour mode: direct, using palette, or mixed.
IF (@palette==0)

       IF (@naturalise==true)
       resultB=resultB*0.8
       ENDIF

#color = rgb(resultR, resultG, resultB)

ELSEIF (@palette==1)
#color = gradient(resultG)

ELSEIF (@palette==2)
 ;gradient is by arithmetic mean of RGB
color  gradcolor=gradient( (resultR+resultG+resultB)*0.333333333333333 )
 ;harmonic of gradient and RGB
resultR=2/(  recip (red(gradcolor))+ recip(resultR) )
resultG=2/(  recip (green(gradcolor))+ recip(resultG) )
resultB=2/(  recip (blue(gradcolor))+ recip(resultB) )

       IF (@naturalise==true)
       resultB=resultB*0.8
       ENDIF

resultAlpha=alpha(gradcolor)
#color = rgba(resultR, resultG, resultB,resultAlpha)

ELSEIF (@palette==3)
; colour mode like of Fractal Explorer.
; uses pallete, but each chanell is calculated seperately.
resultR=red(gradient(resultR))
resultG=green(gradient(resultG))
resultB=blue(gradient(resultB))
resultAlpha=alpha(gradient( resultG))

       IF (@naturalise==true)
       resultB=resultB*0.8
       ENDIF

#color = rgba(resultR, resultG, resultB, resultAlpha)

ELSEIF (@palette==4)
;all waves included.
#color=gradient(3/(recip(resultR) + recip(resultG) + recip(resultB) ) )
ENDIF

    
default:
  title = "Moshiahobrot"
  render = false
  
heading
caption = "Buddha Block"
endheading

float param sampleDensity
caption = "Sample Density"
default = 100.0
hint="The larger value, the more points hits image, the more detailed will be image."
endparam

bool param progress
caption = "Show Progress"
hint = "Shows how rendering is progressing. So you can see, that it is working or not."
default = false
endparam

;float param bailout
;caption = "Bailout"
;default = 4
;hint="This don't requires large bailout, cos points with large value will be outside of image."
;endparam

int param maxiter
caption = "Max Iterations"
default = 25
hint = "Maxiter for fractal. Long orbits will stay in certain alredy dense region."
endparam

heading
caption = "Pixel input Block"
endheading

float param sizescaling
caption = "Image Scale"
default = 1
endparam

float param srcWidth
caption = "Pixel source Width"
default = 5.0
endparam
float param srcHeight
caption = "Pixel source Height"
default = 4.0
endparam

heading
caption = "Formula Block"
endheading

param formula
caption="Fractal Formula"
default=0
enum= "Mandelbrot" "Talis" "Starbrot" "Tricorn" "Bird Of Prey" "8th modulus Mbrot" "Unit Vector - Mbrot" "Quadratic General" "Celtic Mandelbrot" "Rotated Mandelbrot" "Trotsky Dragon" "Multipowerbrot Odd"
endparam

float param power
caption="Power"
default=2
visible = (@formula == 0||@formula == 1||@formula == 3||@formula == 6||@formula == 8||@formula == 9)
endparam

int param starpower
caption="Star Power"
default=7
hint="Star sides = power-1"
visible = (@formula == 2)
endparam

float param unitvector
caption="Unit vector amount"
default=-0.5
hint="Coefficient N for z=z+N*z/|z|"
visible = (@formula == 6)
endparam

heading
caption = "Colour Block"
endheading
  
param palette
caption = "Colour Mode"
enum= "Direct Colouring" "Gradient Based" "Mixed Harmonic" "Fractal Explorer like" "Gradient by Harmonic"
default=3
hint= "Gradient Based is gradient calculated from green channel, gradient harmonic is gradient calc from mean of all channels. Mixed is harmonic mean between gradient colour (by mean of RGB) and RGB channels. Fractal Explorer like is RGB values calculated seperately from gradient. All exept direct colouring uses gradient and alpha channel."
endparam

param switchRB
caption = "Switch Red and Blue"
default=false
hint= "Switch Red and Blue channels."
endparam

float param ambient
caption = "Ambient Light"
default = 0.25
hint="Starts colour calculation with this value + 1/ iteration. Density of colour wave depends on this, lowest is somewhere -2.5."
endparam

param naturalise
caption = "Naturalise Colours"
default=false
visible = (@palette == 0||@palette == 2||@palette == 3)
hint="Removes unnatural blue tint of non-gradient methods."
endparam

float param lightR
caption = "Red light"
default = 0.7
endparam

float param scalarR
caption = "Red scalar"
default = 0.7
endparam

float param lightG
caption = "Green light"
default = 1.2
endparam

float param scalarG
caption = "Green scalar"
default = 1.2
endparam

float param lightB
caption = "Blue light"
default = 0.25
endparam

float param scalarB
caption = "Blue scalar"
default = 0.25
endparam
}

And parameter:
Code:
Fractal1 {
::WNVxign2lJ1yutNMQw7Gw/DE6etJZsUcTAPU3g2eJAFpH6xgNUUSEliUYJVtd/67S9I1A94O
  D3Z2Z52ggOBuH2uhxS2kzoK+yMkogd2Wn6UVH4sOjttLpOckzcwVDGVicHa0UbTRVxni1Q/j
  CxeZ1eJXIL2uZ6dT6qhhkN4VFnA9vaxwovugFGAtNdVJ4cWCBfcAQjPpuaib30DDDWf7c3Eq
  BV89cWP06zG3Ew+RHMR3DXsZ+sONWnxD9UG+RC81AWvbspvgRKgXVFf3ex4oJz6j2azckzO3
  Qt7Dez2Nhx0/T5seDg3I+zhYnF6Cvhh0uRt7dDuloIrxwrRofwZeyQWShtkGyhXHwQLaixcW
  py1EILzv3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ffmR3MdTWpt+pzrXU/V+gQaHQjRy5p8A4LTM6h6+Iw8x8FWOBzmlcaZYBOl8s0wn0tY/LowZ
  fwu2494RexTMZg+KI3hN61/jzH7fzGOsZoKXfX9pX3L+90n9xo9oRPJns/li4O4KbvjPQI7T
  rR7hR71EVnT/bAwg7SH=
}


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on November 27, 2012, 07:39:21 AM
A bitt tweaked implementation. Here are Mandelbrot and Talis. This shows fractal orbits as fethers;)
Throught this still ave mentioned problems and don't have quality I wanted.
I would like to have any suggestions of whatever kind.


Title: Re: Problems with implementing Budhabrot in UF
Post by: cKleinhuis on November 27, 2012, 11:58:44 AM
hi there,

so, rendering inside ultrafractal leaves you with a lot of invisible action that is going on

increasing the quality of your output basically the only thing left to do, is to use MORE and even MORE checked starting values,
the more iterations you use the more clearer the final image becomes!


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on November 27, 2012, 03:26:19 PM
Main problem with UF buddhabrot version is that it is implemented in sneakish way in iterations done in global section, so it just can't be rendered in a flow as in dedicated soft.
Should try to increase visual qualities;)
So far all other UF buddhabrots are map based, its easy to make but don't looks cosmic as original ones.


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on November 28, 2012, 09:57:20 AM
Mostly spent time on coding and then made some fast renders.

Now this slightly faster and with more RGB colour channel switches, one more colour transform and more formula variables, throught zooming still are so so.

Red dots on mandelbrot picture should be some some notable orbits. Position of red dots depends on Random Seed, and with the same random seed spirals allways are in the same places.

Here are two mandelbrots with different random seed and mandelbrot with 8th power modulus.

AntiBuddhabrot seems to be stronger than Buddhabrot becouse escping orbits escapes pretty fast, but non escaping iterates much longer thus generating more antibuddhabrot (non escaping only) like picture. But here mixed version goes pretty well.
p.s.
My monitor seems to be a bitt dark;) Well, any comments about this are strongly welcomed cos I alone with just my opinion won't manage make this good.


Title: Re: Problems with implementing Budhabrot in UF
Post by: cKleinhuis on November 28, 2012, 10:57:41 AM
yeah, i hope you base your programming on the dynamical formula system, so that a formula can be exchanged and display its buddhabrot form,
this is what bugs me most of the programs around, that there is no possibility to switch the formula

and since you are working in ultrafractal, please please please implement it using the object formulas, this would be awesome to play with, even with no live updating of the formula ....


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on November 29, 2012, 11:49:12 AM
I alsou was thinking, that having object formula switch in buddhabrot would be pretty good feature. There are formula switch, but object database is 100 times larger. Throught some object using formulas are nightmare from usability point of wiev, and some  formulas with buddhabrot turns out extremely slow. And this was alsou intended that it would work in Chaos Pro.
So I was thinking about uplooading to UF database two versions, one using object formula switch and another with usual user easy switch.

x=x^2+y^2 +cx
y=x*y +cy

(http://www.ljplus.ru/img4/a/s/asdam/Bddha_quad_1.jpg)

z=z/2-z^6 +c
(http://www.ljplus.ru/img4/a/s/asdam/Bddha_star_1.jpg)

z=z^2+c
z=z - 0.5* z/cabs(z)
(http://www.ljplus.ru/img4/a/s/asdam/Bddha_UnitVector_1.jpg)


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on November 29, 2012, 03:42:38 PM
haha, wow, it's a bomb, a fat star and a fat BBrot.


Title: Re: Problems with implementing Budhabrot in UF
Post by: cKleinhuis on November 29, 2012, 03:43:50 PM
no, the first one is a fish ;)


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 03, 2012, 11:45:38 AM
Much improved version.  + Now this allows much larger sample size * screen resolution. (sample size * screen resolution can exeed integer number upper limit). (800*600)*5000=2 400 000 000 when largest possible integer is +2 147 483 647.
(added extra loop, so that nested loop calculates fractal in 12 parts thus 2 400 000 000/12=200 000 000 (<< 2 147 483 647) so allowing integer math.)
+ Better zooming as it woun't loose so much density by puting hits on pixels outside of screen.
+ More formulas and colour switches.
(some from Fractint Ogfrom, alsou Perpendicular Mandelbrot, and looking in mmf and slightly modifying some formulas found that z=formula*iterations*0.05+c can create cool cosmic deities.
Colours nicely improves when going throught sine, becouse all white regions with colour values >1 ar turned back to colours.)
+ Tweaked the coefficients.
+ Removed excess internal variables.
+ You can put lucky number and see, how different random seeds picks different orbits. Standart random numbers aren't too much random, but this nonrandomness allows to show specific orbits, and with same seed they always 'll be the same orbits.

Still haven't managed to implement class switch, becouse it needs formula(z, c) which don't use #pixel variable. Standart class switch uses formula(z) with #pixel inside of pluggin class. But buddhabrot is calculated in global section before programm reads #pixel. Any tips? But I think, now this in enought good condition to be finalised, just need to write some explanations.


This is slightly different from buddhabrot and antibuddhabrot algorithms that it don't divides escaping and non escaping points, so it is both a buddhabrot and antibudhabrot, anyway, most interesting are region in between and so it needs fewer samples to create final shape what is pretty handy if you are dependent on outside aplication and don't want to look on clock too much. Alsou this do not reiterate formula. And colours here are calculated differently than of standart nebulabrot with 3 iteration numbers, colours still depends on how much times pixel is hit by orbit, but colours are calculated as smooth growing curve so that RGB have different curves. Probably last thing pronounces first notable orbits.

Code:
Fractal1 {
::+IviZjn2lNVTPuJMQ07Ix/BEnaPssYSgQalPsJra6ltqa3D9Y1EbDYVjN12sJp/67YgkGpKk
  QMf8ezb+gGLw8g6TxRJJepXJopfZ2FJN5kk77o155JdCZbnnWhfqgLCrjSCIYWBX6d00ncco
  /zkiHxncSRac0UaT0ygBv0opp7A2vatmRNPNxMAMp/ClgM6tg2NAWh2TvIcxR9wwgU3OjG9K
  s08si8yVlbIrX9YeSP0qpks1xRNGb/oCmStHOLD5G4sRqEaoHbn38gmDWe2YTfaCym9CN97y
  zCFqSp2J5i5uPoiGEu2oFxRmR//HSJ1CweH5vYcdSozc0a8ZjM1tCcfg0AHD/0B9DKxzCskY
  jjjyc05VNXMZ5E48UPM6pPUPDap/o77EHv46Ev/0Zjy4VYoBzpAwAMPYnt2gWjap/dBzbs0H
  yzKn5BXoSHw5UCa87Rg3ATZUkVGIQ+Hhjhpobxx62gHL7HTb/F8o9XnvBWHKNoEeP2/PLtYl
  S2jaa0ioTDpeS6ZdveYH9bTTyAco/oMsezzIFTS35bwLi6HSeDHp7NO89LyzJfYQYlGuk9xA
  TqQBfFBta7iKQNC2gnqyrxPgWb3eL4BsBuFbXogl3jN4ZVcUrF4BBNted9GD2p4pXiUzFnp5
  JMshs06Nkqi66FvhzqZ/kKSBpuscJAu7muUnituqcLZJwq/hosCPpmv5vvmaztSe9PiiSUw/
  FglkokN=
}

Moshiahobrot.ucl:Moshiahobrot {

; This is different from standart Buddhabrot in that
; colours are calculated from progressive curves
; using Wave Trichrome method, who actualy are inspired by RGB Buddhabrots and needs fewer iterations.
; As it don't tests for insdes or outsides of fractal, but mixes buddhabrot and antibuddhabrot.
; source code for this mostly is taken from Susan D. Chambless buddhabrot.
; and one more loop.
;By Edgar Malinovsky 02.12.2012.
::Z/BUlin2luxavtNyxPbD4/DDkveVPsktssTcOdqwh5hODkkm6krtBHSAoIXJxGKSdkU2SC3P
  +OzsP4uUkJHaNQkEndmZndetzsLzJH/Dv8Vv+u39K4l3d/rexHP54Fxpz8j/pTOeecqfBElE
  kJ8zFZTuQDyPpIKOaxyi7nM88bl/6gxmaGb6Bj5ZGz7kjBcKKgchIEmAwt0PiSWvpgGBAJlh
  +F+4kVF00DB5RgkAJ2u+xIitFZbSCafK+QxyOWjucRR5oLFkExDT/b8IwPLzfXOMPNDufKLq
  yJad027/NHeemLP+MSOkOfeOq7EJQ0K/FCHyn+/H5e/PQOvmC8jD2E7XIgZbCDX6DxpprhV+
  J7gioVicj5YzaRGNmUDzgiDS3kUIyAyTggGkuadsYLyjA/io0k8f72V+bjQU+MI/bMiTcsIo
  oEHN7CSIV/FQT/NGeDJaq5Mvc5jcMdTWDkPWNqkK9ctlQ9M+n7OkqKzE8jEiiF4CNINNL0aq
  3GQuoY4Qc7TDEE2ds4yHQlbUyCkqk8C0X3iwdEh9JDhhwyBzjS8xhxvafqfyiYRH7FbONG+l
  9YW0mF82ok/Nxdo9t4T/LyhA6CXM46OVR7Tlo9LsnyB4B54aQgop9lQMOFl6kOw5wouIpR7F
  5y1pFZJ5+knQO7ZgqCJ0CchuEUwIdfUmfS4/e4Bg+ECSBzIuloZA9JDItj3+KPH4watrq8R0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H
  VWLk8ILrPXq9Cz6VkztoG61IjvqF3KZMOdqXfQOkm2ZOnuQi9ppr4d1TodpT38Njr1vWL1I9
  501RIAeYn5/6BXYzwKs7XUvdaNxP54OM8KXGWvK9Fy+LqTbSVVqSTJrpuOCfL2YSLz2RvkbH
  GkjhMBTwOV31nHWAGnKmaMG+FVjhtKTzqbnh7zxmSsXVD6ObCqyT7OFkHopVTreewsyrAuHG
  9JgcWJem+UrSskMd/xU9NmjPBkrEkCD1MezEFPSzSJfkqq246wqR7O6+gt4YtqCaGI044+Ga
  jTv6kz4A45ogK2KWXoOhClMQOwcjiO9izdkpliqu1KPQ9xp4GJxQVm7clbAMp17STIDoa47p
  b0Dnmpku/Qwe4qqEKjUJ86M3KMrcaWcNfyrWh7YAfORkfGGfILwz6lzqET+ay4ZTedaKTz3K
  028CdapHeuEG8mDiBpXcIdeFcptTedrKRXmIHnSazJ2QGKvDlBoyhazU19CvnAO25Q+mZ5Fk
  Pi2fmKtueLm8QHdEzPiF5mj1xCveTSgaLGpFDadRfQZ1G2H+AmkrN6aFliFG1BhdZf4O+l+j
  jgHhYg7agZH5Nuh25YAAiOh5V9R3hcoNiOYzhr7DPPguftNUJ5oOGh9EkPpoWH3HkFRnp8p9
  hfZHCYWaMGY9RychbPDYprs8JwZB/EDBdJ7ZIZY7+Z0g2jYbUATLrUPqY3vCKB/v+aZXM+rX
  HHh63Zi5U/oWHAzZsnicHBu3cnYLsFV1sJb9RR4jYXu62k+T1sAFqP77u5m+/sH2ESv3h14B
  O6ZfjNqk3z9B8RCvCjey1NzI9/BTs4jMUuOJ6ZfXJqOOVjMNcw3TkcTYR5UqViGe93TiqhR1
  qkGZzo/LPj+IhA==
}


Code:
Moshiahobrot {

; This is different from standart Buddhabrot in that
; colours are calculated from progressive curves
; using Wave Trichrome method, who actualy are inspired by RGB Buddhabrots and needs fewer iterations.
; As it don't tests for insdes or outsides of fractal, but mixes buddhabrot and antibuddhabrot.
; source code for this mostly is taken from Susan D. Chambless buddhabrot.
; and one more loop.
;By Edgar Malinovsky 02.12.2012.

$DEFINE DIRECT
global:
float increaser=0
float antilightR=1/@lightR
float antilightG=1/@lightG
float antilightB=1/@lightB
  int seed =  @seedinput
    float dataR=1
    float dataG=1
    float dataB=1

    int pwid = trunc(#width)
    int phgt = trunc(#height)
 
  ;3 arrays for RGB
  float pixR[trunc(#width),trunc(#height)]  ; offscreen image
  float pixG[trunc(#width),trunc(#height)]  ; offscreen image
  float pixB[trunc(#width),trunc(#height)]  ; offscreen image

  ;calculate buddha loop many times
  int superloop=1
  int slcounter =0

  complex locations[@maxiter]       ; collect locations
  int cnt = 0                         ; Loop counters
  float colourcnt = 0                ;colourcounter
  int x = 0, int y = 0              ; Loop counters & integer coords
  float xc =  real(#center)         ; Scaling constants
  float yc = -imag(#center)
  float sina = sin(#angle)
  float cosa = cos(#angle)
 
  float srcMinX = - (@srcWidth * 0.5)
  float srcMinY = - (@srcHeight * 0.5)
  float  scale = (#height * #magn) / 3*(@sizescaling)
  float nsamples =0
  ;float tenth  =0
  int irandX1  =0
  int irandY1   =0
  float srcX1  =0
  float srcY1  =0
  complex z =0
  complex c  =0
  int iter =0
  int locindex =0
  float dx  =0
  float dy   =0
 
; Initialize arrays of RGB pixels with neutral colour.
  while x < #width
    y = 0
    while y < #height
      pixR[x, y] = @ambient
      pixG[x, y] = @ambient
      pixB[x, y] = @ambient
      y = y + 1
    endwhile
    x = x + 1
  endwhile   
 
  ; Main buddha iteration loop
  nsamples = round(#width * #height* #magn)
  cnt = 0
 
;if sample number is too large, divide single
;loop in many small. 12 divides better than 10.
IF @sampleDensity > 41472
nsamples = trunc(nsamples/144)
superloop=144
ELSEIF @sampleDensity > 3456
nsamples = trunc(nsamples/12)
superloop=12
ENDIF

nsamples =  nsamples * @sampleDensity
;tenth = round(nsamples / 10)

while slcounter < superloop  ; superloop
 
  while cnt < nsamples  ;main buddha loop
    ; generate random integers (-#randomrange to #randomrange)
    irandX1 = seed = random(seed)
    irandY1 = seed = random(seed)

    ; convert to random float numbers
    srcX1 = (abs(irandX1) / #randomrange)*@srcWidth + srcMinX
    srcY1 = (abs(irandY1) / #randomrange)*@srcHeight + srcMinY

    ; Mbrot set with random c value
    z = 0
    c = srcX1 + flip(srcY1)

    ; iteration count and modulus, this don't need large bailout
    iter = 0
    while (cabs(z) < 4) && (iter < @maxIter) ;fractal formula loop
 

IF (@formula ==0)
;Mandelbrot
z= z^@power +c
ELSEIF (@formula ==1)
;Talis
z= z^@power/(z^(@power-1) + @talisadd) +c
ELSEIF (@formula ==2)
;Starbrot
z= z*0.5 - z^@starpower + c
ELSEIF (@formula ==3)
;Tricorn
z= conj(z^@power)+c
ELSEIF (@formula ==4)
;BurningSihp
z=abs(z^@power)+c
ELSEIF (@formula ==5)
;8th modulus Mbrot
z=sqr(z)
z=(z^8+z^8)^0.125+c
ELSEIF (@formula ==6)
;Unit Vector - Mbrot
z=z^@power+c
z= z/cabs(z)*@unitvector +z
ELSEIF (@formula ==7)
;Quadratic General
z= sqr(real(z)) + sqr(imag(z))+ flip(real(z)*imag(z)*@quadfactor) + c
ELSEIF (@formula ==8)
;Celtic Mandelbrot
z = z^@power
z = z - real(z) + abs(real(z)) - c
ELSEIF (@formula ==9)
;Rotated Mandelbrot
z=z^@power+c
z=sqr(z)/cabs(z)
ELSEIF (@formula ==10)
;Chebyshev4Axolotl
z = (sqr(z)*(35 * sqr(z) - 30) + 3) / 8 + c
ELSEIF (@formula ==11)
;Mbrot*iters
z=z^@power*iter*0.05 +c
ELSEIF (@formula ==12)
;Talis*iters
z=z^@power*(z^(@power-1)+iter*0.05)+c
ELSEIF (@formula ==13)
;Tricorn*iters
z= conj(z^@power*iter*0.05)+c
ELSEIF (@formula ==14)
;BurningShip*iters
z= abs(z^@power*iter*0.05)+c
ELSEIF (@formula ==15)
;QuadGen*iters
z= (sqr(real(z)) + sqr(imag(z))+ flip(real(z)*imag(z)*@quadfactor) )*iter*0.05 + c
ELSEIF (@formula ==16)
;Trotsky Dragon
z = sqr(z) + sqr(z)*(z+c) - sin(z+@talisadd) + c
ELSEIF (@formula ==17)
;Multipowerbrot Odd
z= ((((z^3*c+1i)^3)+1i)^3)+1i
ELSEIF (@formula ==18)
;Magnetic
z=(z^real(z)+c)/(real(z)-c)
ELSEIF (@formula ==19)
;ChebyshevT4
z = c*(sqr(z)*(sqr(z)*8+8)+1)
ELSEIF (@formula ==20)
;PerpendicularMbrot
z=sqr(real(z)) - sqr(imag(z)) -flip(2*imag(z)*abs(real(z))) + c
ENDIF

        locations[iter] = z
        iter = iter + 1

    endwhile ;end fractal formula loop
   
      locindex = 1 ;for background contrast starts with 1.

      while( locIndex < iter ) ;colour loop
      cnt = cnt+1
     
        dx =  real( locations[locIndex] ) - xc
        dy =  imag( locations[locIndex] ) - yc

      ; Scale to image
        x = round((dx*cosa - dy*sina) * scale + pwid*0.5)
        y = round((dx*sina + dy*cosa) * scale + phgt*0.5)

      ; Plot the point only if inside image
        if x >= 0 && x < pwid && y >= 0 && y < phgt

        ;colours calculated as RGB curves
        colourcnt=colourcnt+1
        increaser=recip(sqrt(colourcnt))
         dataR =  (dataR + increaser )/( @scalarR + abs(pixR[x, y])*antilightR)
         dataG =  (dataG + increaser )/( @scalarG + abs(pixG[x, y])*antilightG)
         dataB =  (dataB + increaser )/( @scalarB + abs(pixB[x, y])*antilightB)

            pixR[x, y] = pixR[x, y] + dataR
            pixG[x, y] = pixG[x, y] + dataG
            pixB[x, y] = pixB[x, y] + dataB

        endif
        locIndex = locIndex + 1

;        if (@progress==true && cnt%tenth == 0)
;$define DEBUG
;          print(round(cnt/nsamples*100), " percent")
;        endif

      endwhile ;end colour loop

  endwhile  ;end main buddha loop
 
;change random seed, increase superloop counter,
;set main loop to 0 and go throught next cycle.
cnt=0
slcounter = slcounter+1
seed = @seedinput + slcounter
endwhile ;end superloop

;now formula will go throught pixels by fractal generator.
init:
int xcrd = 0
int ycrd = 0
float resultR = 0
float resultG = 0
float resultB = 0
float resultAlpha=0

final:
  xcrd = #x
  ycrd = #y
resultR = abs(pixR[xcrd, ycrd])
resultG = abs(pixG[xcrd, ycrd])
resultB = abs(pixB[xcrd, ycrd])


IF (@postfn==0)
;nothing

ELSEIF (@postfn==1)
resultR=sin(resultR)
resultG=sin(resultG)
resultB=sin(resultB)

ELSEIF (@postfn==2)
resultR=1- resultR
resultG=1- resultG
resultB=1- resultB

ELSEIF (@postfn==3)
resultR=sqr(resultR)
resultG=sqr(resultG)
resultB=sqr(resultB)

ELSEIF (@postfn==4)
resultR=cos(resultR)
resultG=cos(resultG)
resultB=cos(resultB)

ELSEIF (@postfn==5)
float sumR = resultR
float sumG = resultG
float sumB = resultB

resultR=abs(resultR -sqrt(sumG*sumB)*0.5)
resultG=abs(resultG -sqrt(sumR*sumB)*0.5)
resultB=abs(resultB -sqrt(sumR*sumG)*0.5)

ELSEIF (@postfn==6)
resultR= abs( resultR -round(resultR) )
resultG= abs( resultG -round(resultG) )
resultB= abs( resultB -round(resultB) )

ELSEIF (@postfn==7)
resultR=tanh(resultR)
resultG=tanh(resultG)
resultB=tanh(resultB)

ELSEIF (@postfn==8)
resultR=sin((resultR) )*cos((resultG))
resultG=sin((resultG) )*cos((resultR))
resultB=sin((resultB) )*cos((resultR))

ELSEIF (@postfn==9)
resultR=sqr(sin(#pi*resultR))
resultG=sqr(sin(#pi*resultG))
resultB=sqr(sin(#pi*resultB))

ENDIF

 ; switching colour channels.
IF (@switchRGB==0)
;nothing
ELSEIF (@switchRGB==1)
  resultAlpha=resultG
resultG=resultR
resultR=resultAlpha
ELSEIF (@switchRGB==2)
  resultAlpha=resultB
resultB=resultR
resultR=resultAlpha
ELSEIF (@switchRGB==3)
  resultAlpha=resultB
resultB=resultG
resultG=resultAlpha
  ENDIF

;colour mode: direct, using palette, or mixed.
IF (@palette==0)

#color = rgb(resultR, resultG, resultB)

ELSEIF (@palette==1)
#color = gradient(resultG)

ELSEIF (@palette==2)
 ;gradient is by arithmetic mean of RGB
color  gradcolor=gradient( (resultR+resultG+resultB)*0.333333333333333 )
 ;harmonic of gradient and RGB
resultR=2/(  recip (red(gradcolor))+ recip(resultR) )
resultG=2/(  recip (green(gradcolor))+ recip(resultG) )
resultB=2/(  recip (blue(gradcolor))+ recip(resultB) )

resultAlpha=alpha(gradcolor)
#color = rgba(resultR, resultG, resultB,resultAlpha)

ELSEIF (@palette==3)
; colour mode like of Fractal Explorer.
; uses pallete, but each chanell is calculated seperately.
resultR=red(gradient(resultR))
resultG=green(gradient(resultG))
resultB=blue(gradient(resultB))
resultAlpha=alpha(gradient( resultG))

#color = rgba(resultR, resultG, resultB, resultAlpha)

ELSEIF (@palette==4)
;all waves included.
#color=gradient(3/(recip(resultR) + recip(resultG) + recip(resultB) ) )
ENDIF

   
default:
title = "Moshiahobrot"
render = false
 
heading
caption = "Use with Pixel aka No Formula."
endheading
 
heading
caption = "Buddha Block"
endheading

int param sampleDensity
caption = "Sample density/incrse"
default = 100
hint="Main variable. The larger value, the more points hits image, the more detailed will be image. Put relatively small value for fast first calculation, then increase for smooth pic."
endparam

;bool param progress
;caption = "Show Progress"
;hint = "Shows how rendering is progressing. So you can see, that it is working or not."
;default = false
;endparam

int param maxiter
caption = "Max Iterations"
default = 200
hint = "Maxiter for fractal. Long orbits will stay in certain alredy dense region, but small maxiter will make this too blury."
endparam

int param seedinput
caption = "Lucky Number"
default = -8
hint="Random seed used to calculate random numbers who realy aren't that random. Different seeds marks different firstfound orbits."
endparam

heading
caption = "Formula Block"
endheading

param formula
caption="Fractal Formula"
default=0
enum= "Mandelbrot" "Talis" "Starbrot" "Tricorn" "BurningSihp" "8th modulus Mbrot" "Unit Vector - Mbrot" "Quadratic General" "Celtic Mandelbrot" "Rotated Mandelbrot" "ChebyshevAxolotl" "Mbrot*iters" "Talis+iters" "Tricorn*iters" "BurningShip*iters" "QuadGen*iters" "Trotsky Dragon" "Multipowerbrot Odd" "Magnetic" "ChebyshevT4" "PerpendicularMbrot"
hint= "Fractal formula used for calculation. Mbrot here stands fro Mandelbrot."
endparam

float param power
caption="Power"
default=2
visible = (@formula == 0||@formula == 1||@formula == 3||@formula == 4||@formula == 6||@formula == 8||@formula == 9||@formula == 11||@formula == 12||@formula == 13||@formula == 14)
endparam

int param starpower
caption="Star Power"
default=7
hint="Star sides = power-1"
visible = (@formula == 2)
endparam

float param unitvector
caption="Unit vector amount"
default=-0.5
hint="Coefficient N for z=z+N*z/|z|"
visible = (@formula == 6)
endparam

float param talisadd
caption="Talis addition"
default=1
hint="Adds value to z"
visible = (@formula == 1||@formula ==16)
endparam

float param quadfactor
caption="Factor of x*y"
default=2.5
hint="2 is very celtic and 2 is very cosmic."
visible = (@formula == 7||@formula ==15)
endparam

heading
caption = "Pixel input Block"
endheading

float param sizescaling
caption = "Size Scale"
default = 1
hint="Scaling here works as zooming in or out."
endparam

float param srcWidth
caption = "Pixel source Width"
default = 5.0
endparam
float param srcHeight
caption = "Pixel source Height"
default = 4.0
endparam

heading
caption = "Colour Block"
endheading
 
param palette
caption = "Colour Mode"
enum= "Direct Colouring" "Gradient Based" "Mixed Harmonic" "Fractal Explorer like" "Gradient by Harmonic"
default=0
hint= "Gradient Based is gradient calculated from green channel, gradient harmonic is gradient calc from mean of all channels. Mixed is harmonic mean between gradient colour (by mean of RGB) and RGB channels. Fractal Explorer like is RGB values calculated seperately from gradient. All exept direct colouring uses gradient and alpha channel."
endparam

param switchRGB
caption = "Switch Colours"
enum ="None" "Switch Red and Green" "Switch Red and Blue" "Switch Green and Blue"
default=0
hint= "Switch colour channels to change image tones, so that don't need to change light and scalar of RGB."
endparam

float param ambient
caption = "Ambient Light"
default = 0.12
hint="Greyscale colour value of uniterated pixel. Result then is added / substracted from this."
endparam

param postfn
caption = "Transfer Function"
enum = "0- None" "1- Sin (periodic)" "2- Inverted" "3- Square Power (sharper)" "4- Cos (Inv periodic)" "5- Accentuate RGB" "6- Solarisation (periodic)" "7- Hyperbolic Tangent"  "8- SineCosineMix (periodic)" "9- Haversine (periodic)"
default =  0
hint="The same as UF, but applied before colour mode, and works with direct colour. Periodic will colour white regions."
endparam

heading
caption = "RGB block"
endheading

float param lightR
caption = "Red light"
default = 0.39
endparam

float param scalarR
caption = "Red scalar"
default = 0.65
endparam

float param lightG
caption = "Green light"
default = 0.99
endparam

float param scalarG
caption = "Green scalar"
default = 1.5
endparam

float param lightB
caption = "Blue light"
default = 0.15
endparam

float param scalarB
caption = "Blue scalar"
default = 0.3
endparam
}
[/size]


p.s.
If there are someone who are making another Buddhabrot aplication, I think, this could have some  ideas what to do.


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 03, 2012, 11:46:17 AM
Here are pics

z = (sqr(z)*(35 * sqr(z) - 30) + 3) / 8 + c
(http://www.ljplus.ru/img4/a/s/asdam/Buddha_brot_axolotl_2.jpg)



z= abs(z^3*iter*0.05)+c
iter=iter+1
(http://www.ljplus.ru/img4/a/s/asdam/Buddha_brot_blue_phenix_2.jpg)



Rotated by 90 degrees.
z=z^2*iter*0.05 +c
iter=iter+1
(http://www.ljplus.ru/img4/a/s/asdam/Buddha_brot_mbrotiter.jpg)



z= conj(z^-4*iter*0.05)+c
iter=iter+1
(http://www.ljplus.ru/img4/a/s/asdam/Buddha_brot_minustricon.jpg)



PerpendicularMandelbrot
z=sqr(real(z)) - sqr(imag(z)) -flip(2*imag(z)*abs(real(z))) + c
(http://www.ljplus.ru/img4/a/s/asdam/Buddha_brot_perpendicular.jpg)


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 03, 2012, 01:41:24 PM
you get quite some nice results.
What you do seems sort of similar to most of my works.
Except for the first, oldest one in this set (which was made in Blender and Indigo, although it's such a simple scene, you could probably write it into an indigo xml format by hand), all of them are some sort of Buddhabrot fractal.
http://kram1032.deviantart.com/gallery/8114987
For a while I used random polynomials of fifth order. Those turned out to be pretty nice.


Title: Re: Problems with implementing Budhabrot in UF
Post by: Ryan D on December 03, 2012, 06:32:19 PM
I enjoy fiddling with Fractint and using its rather simple orbit display method of rendering images to come up with Buddhabrot-style animations.  Although I must say that I'm completely baffled by what video file settings might be needed to come up with something that looks good on either Vimeo or YouTube - the shaded, wispy colours are usually butchered by the compression routines used by these two sites.  I can come up with something that looks fairly clean with Sony Vegas (images are rendered, processed and uploaded at 1280x720), but most of the Buddhabrot-style animations range from mediocre to dreadful when viewed online.  Oh well.  Nonetheless, here are a couple of my favourite orbit cloud animations.  The first is a Barnsley Julia, the second one of Fractint's invented generalized function fractals using the old buggy cosxx routine.

Ryan

http://vimeo.com/moogaloop.swf?clip_id=49018096&amp;server=vimeo.com&amp;fullscreen=1

http://vimeo.com/moogaloop.swf?clip_id=49084660&amp;server=vimeo.com&amp;fullscreen=1


Title: Re: Problems with implementing Budhabrot in UF
Post by: fractalrebel on December 03, 2012, 08:07:33 PM

Still haven't managed to implement class switch, becouse it needs formula(z, c) which don't use #pixel variable. Standart class switch uses formula(z) with #pixel inside of pluggin class. But buddhabrot is calculated in global section before programm reads #pixel. Any tips?

Whose Class Switch are you using? Mine and Dave Makin's are substantially different. :D


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 05, 2012, 09:21:52 AM
Whose Class Switch are you using? Mine and Dave Makin's are substantially different. :D
Standart. Yourš seems simmilar. Maybe David Makin's could work becouse they uses different switches and bailouts so probably don't have #pixel inside.

Changed coeffs, so that colours are less bright + sine transform to turn whites back to colours + more sampling.

(http://www.ljplus.ru/img4/a/s/asdam/Buddhi_Mbrot_zoom2.jpg)

Lines should be of not enought area of pixel sampling.
(http://www.ljplus.ru/img4/a/s/asdam/Buddhi_Mbrot_zoom3.jpg)


 z*tan(z)+c render is nice one. I tested the same formula, but got something different, probably cos of small bailout or something.
http://kram1032.deviantart.com/art/A-nice-tan-157868619 (http://kram1032.deviantart.com/art/A-nice-tan-157868619)


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 05, 2012, 12:55:19 PM
I can't recall what exact bailout settings I used and such. It's very likely that I simply used a circular region of big radius. Not the typical radius 2 but more like radius 32 or something.
I wonder what would be the "actual" formula for it.
Note, though, that what you see is a fairly low-quality image that is relatively heavily post-processed to recduce noise and such.
Furthermore, it's an antibuddhabrot.

I noticed in later experiments that you can significantly change the results by discarding values that are inappropriate for the given render. It may very well be that, if you have a different bailout strategy, you get quite a different result.
I'd love to see more experimentation with that MSet. I already noticed that it essentially includes features of polynomial MSets of every order. Likely a result of the tangens being a exponential and rational function.

A proper bailout area likely is relatively complex, since tan repeats infinitely and thus there are infinitely many regions outside of any given circle that would still converge. (notably all the points where x tan x = 0 , which happens where ever tan x = 0)

That being said, I'd love to see your versions for comparison.


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 05, 2012, 05:29:50 PM
I 'stolen' some of your formulas so will try out what will happen;) Especialy cos there are spirals.

 If you have simple polynomial probably bailout value don't have so much role, if modulus is larger than 4, it don't go back to screen coordinates. So I kept it low, so to reduce calculations. With tan it is a bitt different, orbits goes back to screen even if they are larger than 4.

Mine pic don't have any postprocess, I posted as they were.
However my version is not proper buddhabrot or antibuddhabrot, it's more like (calculation) optimised version, as it don't checks for insides or outsides. Insides iterates longer so it looks more like antibuddhabrot. But it's antibuddhabrot which correspondents to logistic map like mandelbrot set do.


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 05, 2012, 09:07:36 PM
Sounds nice. I don't *quite* understand what you mean (I think there might be a slight language barrier) but I think I roughly get the idea.
Yeah, that nice tan was one of the best simple formulae I found.
Two others were the two möbius transform - like ones: http://kram1032.deviantart.com/art/the-Summoner-147550121?q=gallery%3Akram1032%2F8114949&qo=23 and http://kram1032.deviantart.com/art/Daemon-of-Circles-147362622?q=gallery%3Akram1032%2F8114949&qo=24

Just keep 'em comming. I'm glad somebody tries to explore these further. My own program sadly is terribly slow and I also have less time than I used to, to try out new ones. Occationally that still happens though.


Title: Re: Problems with implementing Budhabrot in UF
Post by: Ryan D on December 05, 2012, 11:22:31 PM
Here's a collection of "exploding Buddhabrots", again using Fractint.  Fractint has a number of hard-coded fractal types that allow for function switching once an intermediate bailout value is reached.  In this case, I switched from the Buddhabrot (z squared + c) to one of the 26 function variants (for example, sin(z) +c, log(z) + c, acosh(z) + c, etc).  The individual animation segments all start with an immediate switch to the function variant, and over time the intermediate bailout increases logarithmically from 0 to some arbitrarily large number, 888 or something like that.  Some of the function variants look quite unusual when the iteration is started at these more-or-less random initial points.

http://vimeo.com/moogaloop.swf?clip_id=49909314&amp;server=vimeo.com&amp;fullscreen=1

In order, the function variants are:

SIN
COS
TAN
COTAN
SINH
COSH
TANH
COTANH
EXP
LOG
RECIP
IDENT
ZERO
ONE
CONJ
FLIP
COSXX
ASIN
ASINH
ACOS
ACOSH
ATAN
ATANH
SQRT
ABS
CABS

Ryan


Title: Re: Problems with implementing Budhabrot in UF
Post by: cKleinhuis on December 05, 2012, 11:52:37 PM
good animation but far too fast ;)

i like that you plot the complex transform, but it is far far far too fast dude!!

how much differs a triplex brot ... buddhas in 3d ... i think someone did it before, but no time to search ;)#


Title: Re: Problems with implementing Budhabrot in UF
Post by: Ryan D on December 06, 2012, 12:53:07 AM
good animation but far too fast ;)

The "too fast" was intentional for that animation.  I had tried two of the more complex function variants already, both in slow motion and zoomed in a bit (and one rotated 90°).  When I decided to try them all, it was done mostly as a rough test (for that matter, all my animations so far are just rough tests).  To do all 26 types with the slower animation, the video would have been 17 minutes long.  And it would have taken 14 days to render the frames ....

http://vimeo.com/moogaloop.swf?clip_id=49744244&amp;server=vimeo.com&amp;fullscreen=1

http://vimeo.com/moogaloop.swf?clip_id=49717156&amp;server=vimeo.com&amp;fullscreen=1

Ryan


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 06, 2012, 10:03:54 AM

If you calculate buddhabrot proper you pick random points, iterate, and throw out non escaping orbits and picture builts up very slowly. If you iterate and throw out escaping orbits, you have antibuddhabrot, and picture builts much faster, but still some orbits are iterated but not used. So I didn't throw out any orbits, what saves some calculation time, but it's not quite an buddhabrot or antibuddhabrot;). Alsou if you iterate point twice as described in original buddhabrot algorithm, it makes it slow. And probably alsou colour calculation by 3 iteration lenghts makes it 3x slower.
This one is reasonably fast even on my very old old pentium 2.
Tested some formulas and picked what looked best.

;Royal Imagination
z=sqr(real(z))- sqr(sqr(imag(z))) + flip( 2*real(z)*imag(z) ) +c
(x->x2-y4+x0  y->2xy+y0)
In switch I named this Royal Mbrot. Royals must be obese. Here ambient light is negative, and colour value is added to it. Then colours are by absolute value.
(http://www.ljplus.ru/img4/a/s/asdam/Buddhi_RoyalMbrot.jpg)

;Swirl Mbrot
z=(e^flip(cabs(z)+atan2(z))*z )^3  +c
abs(x+yi)*ei(abs(x+yi)+arg(x+yi)) squared +c didn't wanted to generate simmetric picture, but with real modulus it become simmetric. Inverted and switched channels.
(http://www.ljplus.ru/img4/a/s/asdam/Buddhi_SwirlMbrot.jpg)

;Tangentbrot
z=tan(z)*z+c
With basic values it were too pixelate, but with slightly less colours and more ambient light there are less pixels.
(http://www.ljplus.ru/img4/a/s/asdam/Buddhi_Tangentbrot.jpg)

Oops, after it rendered I slightly moved picture (I renered this in Chaos pro), so it cutted of the bottom. So while eating breakfest I rendered tangentbrot is smaller resolution. Maybe too much ambient light. This needs bitt tweaking or contrast.
(http://www.ljplus.ru/img4/a/s/asdam/Buddhi_Tangentbrot_sml.jpg)



Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 06, 2012, 11:25:37 AM
I'm not calculating colors three times. Rather I "cut them off", e.g. I do:
"Once 200 is reached, save results into blue channel."
"Once 2000 is reached, save results into green channel."
"Once 20000 is reached, sace results into red channel and stop."
So at the very least it's efficient in this way.

I really love the swirl transform I crafted. (I really crafted it. I recall finding out about gravity waves back then and there was a Wikipedia image of two neutron stars orbiting each other, generating swirly waves, so I tried to find a way to make such waves myself.)
The squared Version wasn't symmetric, you say? Weird...
i think there might be some nice variants of it, if you fiddle with the frequencies.
Try something like
|z| e^{i f |z|}\text{sgn}(z)^g
where f and g would be frequency factors.
An increase in f would mean more frequent ripples along the radius, while an increase in g would mean more turns.

Also interesting might be
|z|^{1+i} \text{sgn}(z)
which should make the ripples along the radius be dependend on the logarithmic distance rather than the linear one, so the spiral becomes logarithmic instead of Archimedean.

Note, what ever formula you try, the described swirl transforms should simply replace your typical z, rather than the entire equation.

So I see you liked my naming of that later one. :)


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 07, 2012, 10:19:19 AM
Shame that on office PC I can't watch videos;)
Quote
I really love the swirl transform I crafted. (I really crafted it. I recall finding out about gravity waves back then and there was a Wikipedia image of two neutron stars orbiting each other, generating swirly waves, so I tried to find a way to make such waves myself.)
The squared Version wasn't symmetric, you say? Weird...
Swirl transform worked corectly. Just that in ultrafractal abs(z) is not the modulus of z. in UF  cabs(z) = (x^2 + y^2)^1/2, but abs(z) returns complex positive value, so its different function. And in UF flip(x) switches real and imaginary values.
But z=(e^flip(cabs(z)+atan2(z))*z )^@power  +c had more features than z=(e^flip(cabs(z)+atan2(z))*cabs(z) )^@power  +c . A bitt faster z=(exp(flip(cabs(z)+atan2(z)) ) *z )^@power  +c

Nice transform. So far they didn't found graviational waves, but relativity is convincing so probably they will found.

Quote
"Once 20000 is reached, sace results into red channel and stop."
I used 200 as maximum iterations. Probably this is real reason for speed differences. With my colour calculation method colours alredy are generated at low iterations, and larger maximum iterations just increases contrast of final picture.


;Swirl Mbrot
z=(exp(flip(cabs(z)+atan2(z)) ) *z )^@power  +c
with power =2 it is simmetric. Red is becouse of sin transfer function.

(http://www.ljplus.ru/img4/a/s/asdam/Gaonbrot_Swirl_Square.jpg)

;SummonerEye
z=(z + c) / ( conj(z)- c+ @talisadd )
With talisadd =1
Modified formula from The summoner. SMooth colours are becouse of sin(colour).
(http://www.ljplus.ru/img4/a/s/asdam/Gaonbrot_summonerEye.jpg)

;Gavarun
z=cabs(z)^( @talisadd + flip(atan2(z) ) ) +c
With talisadd=1
Pretty cool transform, this didn't needed  additional squaring. Looking at this I remembered russian cartoon parrot who were able to fly in space.
(http://www.ljplus.ru/img4/a/s/asdam/Gaonbrot_Gavarun.jpg)

p.s.
This is stupid, but just can't decide, how to call this:
http://www.fractalforums.com/fractal-programs/poll-about-neigbouring-thread/ (http://www.fractalforums.com/fractal-programs/poll-about-neigbouring-thread/)


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 07, 2012, 01:20:11 PM
I know they didn't find them yet. But they illustrated the expected waves in a gif.
(http://upload.wikimedia.org/wikipedia/commons/b/b8/Wavy.gif)
That's what I was aiming for with my transform.

To get to that from my version, you just need to normalize the wave heigth, mess a bit with the frequencies and add in a time dependency and possibly, to get to a more generic form, a phase.

By the way, the Summoner and the Daemon of Circles both do not require squaring. The formulae I wrote down were the full thing. No powers used.

There might also be a nice triplex version to this...

The swirl transform would then be something like:

x=r cos(phi + r) sin(theta + r)
y=r cos(phi + r) cos(theta + r)
z=r sin(phi +r)

or some corresponding variant of that...
For the logarithmic version, just use log(r) in the sin and cos instead of r. You might also want to mess around with prefactors to further control frequencies and phases of the ripples.

The bailout values you mention were an example by me. While often do use 200,2000,20000, it's not always the case. Some of the transforms I used in fact need less to even show anything.


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 07, 2012, 05:23:10 PM
In M3D there are some rotation modifications, just haven't looked are they different or alredy the same. Kali seems to used some e^ %^#&*^ rotations. But as far as I know, there aren't 3D version of this:

 |z|^{1+i} \text{sgn}(z)
With this one can put 1 as coeffitient. It somewhat hearth like.

I had read a lott about a gravitation waves. Of all undetected physical phenomen, they seems to be the most probable, much moreso than dark energy.

 :peacock:
Finnaly uploaded this version of Buddhabrot in Ultra Fractal database (in EM.ucl) and in Chaos Pro. But with the name BRAHMABROT. IMHO it is enought different to have special name;)

http://www.chaospro.de/formulas/display.php?fileid=238 (http://www.chaospro.de/formulas/display.php?fileid=238)


Title: Re: Problems with implementing Budhabrot in UF
Post by: cKleinhuis on December 07, 2012, 05:29:28 PM
what is the red dots in the image, me dont like ... can you remove them ?!


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 10, 2012, 08:05:51 AM
Slightly improved my Brahmabrot technique.

To the normal mandelbrot bailout added newton bailout conditions. So bailout is:
 ( (cabs(z) < 4) && (cabs(zold-z) >0.001 ) && (iter < @maxIter) )
This is more like magnet bailout, it reveals more features as it don't allows non escaping orbits to iterate too long so filling everything with white. But it alsou means slight loss of speed. Realy it is much better now. With new bailout and zold variable now I can make Magnet and Manowar buddhas, but tangent formula somewhat dissapeared. Probably more easy for exploring formulas would be to have class switch, but then with my own classes.

Alsou tweeked parameters, so that there are less dots. Decreasing bailout value for unknown reason decreased number of dots a lot. Dots alsou depend on colour parameters. Red dots should be some special orbits, they somewhat depends on random seed. I kind of liked spirals and owerall imperfect looks, but when they are not too much;)



In UF ducks fractal uses rotation like this:
z = exp(1i*parameter/pi*180)*z
And in Mandelbulb3D rotation is by sines and cosines:
SinCos(Iteration_multiplier * rho * Pid180, s, c)
x' = x * c + y * s
y' = y * c - x * s
So gravitation waves inspired Swirlbrot rotation (exp( 1i*(cabs(z)+atan2(z)  )  ) *z ) indeed are novel way in fractal world:) I tested it as escape time formula, nice one, it's like rotated LKM's rotated mandelbrot;)



Here is final quality parameter file. It woun't render fast and you 'll see nothing before completion, throught. On my ancient PC it took 2 hours.
Code:
Fractal1 {
fractal:
  title="Fractal1" width=800 height=600 layers=1
  credits="Asdam;12/8/2012"
layer:
  caption="Background" opacity=100 transparent=yes
mapping:
  center=0/0 magn=1
formula:
  maxiter=100 filename="Standard.ufm" entry="Pixel"
inside:
  transfer=none
outside:
  transfer=linear filename="em.ucl" entry="Brahmabrot"
  p_sampleDensity=10000 p_maxiter=200 p_seedinput=-8
  p_formula=Mandelbrot p_power=2 p_starpower=7 p_unitvector=-0.5
  p_talisadd=1 p_quadfactor=2.5 p_sizescaling=1 p_srcWidth=5
  p_srcHeight=4 p_palette="Direct Colouring" p_switchRGB=None
  p_ambient=0.12 p_postfn="0- None" p_lightR=0.38 p_scalarR=0.7
  p_lightG=0.98 p_scalarG=1.6 p_lightB=0.14 p_scalarB=0.3
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
}

If someone are interested in UF code, here it is, throught Chaos Pro have more normal C style language and complex numbers generated in more usual way like complex(n ,m) instead of n + flip(m):

Code:
Brahmabrot {
; This is different from standart Buddhabrot in that
; colours are calculated from progressive curves
; using Wave Trichrome method, who are inspired by RGB Buddhabrots but needs fewer iterations.
; As it don't tests for insdes or outsides of fractal, but mixes buddhabrot and antibuddhabrot.
; Alsou it used both mandelbrot and newton bailout.
; source code for this mostly is taken from Susan D. Chambless buddhabrot.
; and one more loop.
; Some formulas like Swirl transform, Royal, SummonerEye, Gavarun are by Kram1032.
;By Edgar Malinovsky 02.12.2012.

;http://www.fractalforums.com/fractal-programs/problems-with-implementing-budhabrot-in-uf/
;08.12.2012
; Added newton bailout revealing more features.
; Tweeking of parameters, so that there are less dots.
; Changed some formulas for another.

; You may redistribute this algorithm, modify, derivate or use comercialy as you wish as long as you give proper credits.


$DEFINE DIRECT
global:
float increaser=0
float antilightR=1/@lightR
float antilightG=1/@lightG
float antilightB=1/@lightB
  int seed =  @seedinput
    float dataR=1
    float dataG=1
    float dataB=1

    int pwid = trunc(#width)
    int phgt = trunc(#height)

  ;3 arrays for RGB
  float pixR[trunc(#width),trunc(#height)]  ; offscreen image
  float pixG[trunc(#width),trunc(#height)]  ; offscreen image
  float pixB[trunc(#width),trunc(#height)]  ; offscreen image

  ;calculate buddha loop many times
  int superloop=1
  int slcounter =0

  complex locations[@maxiter]       ; collect locations
  int cnt = 0                         ; Loop counters
  float colourcnt = 0                ;colourcounter
  int x = 0, int y = 0              ; Loop counters & integer coords
  float xc =  real(#center)         ; Scaling constants
  float yc = -imag(#center)

  float srcMinX = - (@srcWidth * 0.5)
  float srcMinY = - (@srcHeight * 0.5)
  float  scale = (#height * #magn) / 3*(@sizescaling)
  float nsamples =0
  int irandX1  =0
  int irandY1   =0
  float srcX1  =0
  float srcY1  =0
  complex z =0
  complex c  =0
  complex zold=1
  int iter =0
  int locindex =0
  float dx  =0
  float dy   =0

; Initialize arrays of RGB pixels with neutral colour.
  while x < #width
    y = 0
    while y < #height
      pixR[x, y] = @ambient
      pixG[x, y] = @ambient
      pixB[x, y] = @ambient
      y = y + 1
    endwhile
    x = x + 1
  endwhile

  ; Main buddha iteration loop
  nsamples = round(#width * #height* #magn)
  cnt = 0

;if sample number is too large, divide single
;loop in many small. 12 divides better than 10, so multiples of 12 is used.
IF @sampleDensity > 497664
nsamples = trunc(nsamples/3456)
superloop=3456
ELSEIF @sampleDensity > 41472
nsamples = trunc(nsamples/288)
superloop=288
ELSEIF @sampleDensity > 3456
nsamples = trunc(nsamples/24)
superloop=24
ELSE
nsamples = trunc(nsamples/4)
superloop=4
ENDIF

nsamples =  nsamples * @sampleDensity

while slcounter < superloop  ; superloop

  while cnt < nsamples  ;main buddha loop
    ; generate random integers (-#randomrange to #randomrange)
    irandX1 = seed = random(seed)
    irandY1 = seed = random(seed)

    ; convert to random float numbers
    srcX1 = (abs(irandX1) / #randomrange)*@srcWidth + srcMinX
    srcY1 = (abs(irandY1) / #randomrange)*@srcHeight + srcMinY

    ; Mbrot set with random c value
    z = 0
    c = srcX1 + flip(srcY1)
    zold=1
    ; iteration count and modulus, this don't need large bailout
    iter = 0
    while ( (cabs(z) < 4) && (cabs(zold-z) >0.001 ) && (iter < @maxIter) ) ;fractal formula loop

zold=z
IF (@formula ==0)
;Mandelbrot
z= z^@power +c
ELSEIF (@formula ==1)
;Talis
z= z^@power/(z^(@power-1) + @talisadd) +c
ELSEIF (@formula ==2)
;Starbrot
z= z*0.5 - z^@starpower + c
ELSEIF (@formula ==3)
;Tricorn
z= conj(z^@power)+c
ELSEIF (@formula ==4)
;BurningSihp
z=abs(z^@power)+c
ELSEIF (@formula ==5)
;8th modulus Mbrot
z=sqr(z)
z=(z^8+z^8)^0.125+c
ELSEIF (@formula ==6)
;Unit Vector - Mbrot
z=z^@power+c
z= z/cabs(z)*@unitvector +z
ELSEIF (@formula ==7)
;Quadratic General
z= sqr(real(z)) + sqr(imag(z))+ flip(real(z)*imag(z)*@quadfactor) + c
ELSEIF (@formula ==8)
;Celtic Mandelbrot
z = z^@power
z = z - real(z) + abs(real(z)) - c
ELSEIF (@formula ==9)
;Rotated Mandelbrot
z=z^@power+c
z=sqr(z)/cabs(z)
ELSEIF (@formula ==10)
;Chebyshev4Axolotl
z = (sqr(z)*(35 * sqr(z) - 30) + 3) / 8 + c
ELSEIF (@formula ==11)
;Mbrot*iters
z=z^@power*iter*0.05 +c
ELSEIF (@formula ==12)
;Talis*iters
z=z^@power*(z^(@power-1)+iter*0.05)+c
ELSEIF (@formula ==13)
;Tricorn*iters
z= conj(z^@power*iter*0.05)+c
ELSEIF (@formula ==14)
;BurningShip*iters
z= abs(z^@power*iter*0.05)+c
ELSEIF (@formula ==15)
;QuadGen*iters
z= (sqr(real(z)) + sqr(imag(z))+ flip(real(z)*imag(z)*@quadfactor) )*iter*0.05 + c
ELSEIF (@formula ==16)
;Manowar
z = z^2 + zold + c
ELSEIF (@formula ==17)
;Multipowerbrot Odd
z= ((((z^3*c+1i)^3)+1i)^3)+1i
ELSEIF (@formula ==18)
;MagnetII
z=sqr((z*z*z+3*z*(c-1)+(c-1)*(c-2))/(sqr(z)*3+3*(c-2)*z+(c-1)*(c-2)+1))
ELSEIF (@formula ==19)
;ChebyshevT4
z = c*(sqr(z)*(sqr(z)*8+8)+1)
ELSEIF (@formula ==20)
;PerpendicularMbrot
z=sqr(real(z)) - sqr(imag(z)) -flip(2*imag(z)*abs(real(z))) + c
ELSEIF (@formula==21)
;Royal Imagination
z=sqr(real(z))- sqr(sqr(imag(z))) + flip( 2*real(z)*imag(z) ) +c
ELSEIF (@formula ==22)
;Swirl Mbrot
z=(exp(flip(cabs(z)+atan2(z)) ) *z )^@power  +c
ELSEIF (@formula ==23)
;ConjugateBeholder
z=(z + c) / ( conj(z)- c+ @talisadd )
ELSEIF (@formula ==24)
;Gavarun
z=(cabs(z))^(@talisadd + flip(atan2(z) ) ) +c
ELSEIF (@formula ==25)
;MalinovskyDeco
z=sinh(z)*z^(@power-1) - c^@power
ELSEIF (@formula ==26)
;Multipowerbrot Even
z= sqr( ( sqr( z*z*c +1 )) -1 ) -1
ENDIF

        locations[iter] = z
        iter = iter + 1

    endwhile ;end fractal formula loop

      locindex = 1 ;for background contrast starts with 1.

      while( locIndex < iter ) ;colour loop
      cnt = cnt+1

        dx =  real( locations[locIndex] ) - xc
        dy =  imag( locations[locIndex] ) - yc

      ; Scale to image
        x = round(dx*scale + pwid*0.5)
        y = round(dy*scale + phgt*0.5)

      ; Plot the point only if inside image
        if x >= 0 && x < pwid && y >= 0 && y < phgt

        ;colours calculated as RGB curves
        colourcnt=colourcnt+1
        increaser=recip(sqrt(colourcnt))
         dataR =  (dataR + increaser )/( @scalarR + abs(pixR[x, y])*antilightR)
         dataG =  (dataG + increaser )/( @scalarG + abs(pixG[x, y])*antilightG)
         dataB =  (dataB + increaser )/( @scalarB + abs(pixB[x, y])*antilightB)

            pixR[x, y] = pixR[x, y] + dataR
            pixG[x, y] = pixG[x, y] + dataG
            pixB[x, y] = pixB[x, y] + dataB

        endif
        locIndex = locIndex + 1

      endwhile ;end colour loop

  endwhile  ;end main buddha loop

;change random seed, increase superloop counter,
;set main loop to 0 and go throught next cycle.
cnt=0
slcounter = slcounter+1
seed = @seedinput + slcounter
endwhile ;end superloop

;now formula will go throught pixels by fractal generator.
init:
int xcrd = 0
int ycrd = 0
float resultR = 0
float resultG = 0
float resultB = 0
float resultAlpha=0

final:
  xcrd = #x
  ycrd = #y
resultR = abs(pixR[xcrd, ycrd])
resultG = abs(pixG[xcrd, ycrd])
resultB = abs(pixB[xcrd, ycrd])


IF (@postfn==0)
;nothing

ELSEIF (@postfn==1)
resultR=sin(resultR)
resultG=sin(resultG)
resultB=sin(resultB)

ELSEIF (@postfn==2)
resultR=1- resultR
resultG=1- resultG
resultB=1- resultB

ELSEIF (@postfn==3)
resultR=sqr(resultR)
resultG=sqr(resultG)
resultB=sqr(resultB)

ELSEIF (@postfn==4)
resultR=1-sin(resultR)
resultG=1-sin(resultG)
resultB=1-sin(resultB)

ELSEIF (@postfn==5)
float sumR = resultR
float sumG = resultG
float sumB = resultB

resultR=abs(resultR -sqrt(sumG*sumB)*0.5)
resultG=abs(resultG -sqrt(sumR*sumB)*0.5)
resultB=abs(resultB -sqrt(sumR*sumG)*0.5)

ELSEIF (@postfn==6)
resultR= abs( resultR -round(resultR) )
resultG= abs( resultG -round(resultG) )
resultB= abs( resultB -round(resultB) )

ELSEIF (@postfn==7)
resultR=tanh(resultR)
resultG=tanh(resultG)
resultB=tanh(resultB)

ELSEIF (@postfn==8)
resultR=sin((resultR) )*cos((resultG))
resultG=sin((resultG) )*cos((resultR))
resultB=sin((resultB) )*cos((resultR))

ELSEIF (@postfn==9)
resultR=sqr(sin(#pi*resultR))
resultG=sqr(sin(#pi*resultG))
resultB=sqr(sin(#pi*resultB))

ENDIF

 ; switching colour channels.
IF (@switchRGB==0)
;nothing
ELSEIF (@switchRGB==1)
  resultAlpha=resultG
resultG=resultR
resultR=resultAlpha
ELSEIF (@switchRGB==2)
  resultAlpha=resultB
resultB=resultR
resultR=resultAlpha
ELSEIF (@switchRGB==3)
  resultAlpha=resultB
resultB=resultG
resultG=resultAlpha
  ENDIF

;colour mode: direct, using palette, or mixed.
IF (@palette==0)

#color = rgb(resultR, resultG, resultB)

ELSEIF (@palette==1)
#color = gradient(resultG)

ELSEIF (@palette==2)
 ;gradient is by arithmetic mean of RGB
color  gradcolor=gradient( (resultR+resultG+resultB)*0.333333333333333 )
 ;harmonic of gradient and RGB
resultR=2/(  recip (red(gradcolor))+ recip(resultR) )
resultG=2/(  recip (green(gradcolor))+ recip(resultG) )
resultB=2/(  recip (blue(gradcolor))+ recip(resultB) )

resultAlpha=alpha(gradcolor)
#color = rgba(resultR, resultG, resultB,resultAlpha)

ELSEIF (@palette==3)
; colour mode like of Fractal Explorer.
; uses pallete, but each chanell is calculated seperately.
resultR=red(gradient(resultR))
resultG=green(gradient(resultG))
resultB=blue(gradient(resultB))
resultAlpha=alpha(gradient( resultG))

#color = rgba(resultR, resultG, resultB, resultAlpha)

ELSEIF (@palette==4)
;all waves included.
#color=gradient(3/(recip(resultR) + recip(resultG) + recip(resultB) ) )
ENDIF

default:
title = "Brahmabrot"
render = false

heading
caption = "Use with Pixel aka No Formula."
endheading

heading
caption = "Buddha Block"
endheading

int param sampleDensity
caption = "Sample density/incrse"
default = 100
hint="Main variable. The larger value, the more points hits image, the more detailed will be image. Put relatively small value for fast first calculation, then increase for smooth pic."
endparam

int param maxiter
caption = "Max Iterations"
default = 200
hint = "Maxiter for fractal. Long orbits will stay in certain alredy dense region, but small maxiter will make this too blury."
endparam

int param seedinput
caption = "Lucky Number"
default = -8
hint="Random seed used to calculate random numbers who realy aren't that random. Different seeds marks different firstfound orbits."
endparam

heading
caption = "Formula Block"
endheading

param formula
caption="Fractal Formula"
default=0
enum= "Mandelbrot" "Talis" "Starbrot" "Tricorn" "BurningSihp" "8th modulus Mbrot" "Unit Vector - Mbrot" "Quadratic General" "Celtic Mandelbrot" "Rotated Mandelbrot" "ChebyshevAxolotl" "Mbrot*iters" "Talis+iters" "Tricorn*iters" "BurningShip*iters" "QuadGen*iters" "Manowar" "Multipowerbrot Odd" "MagnetII" "ChebyshevT4" "PerpendicularMbrot" "Royal Mbrot" "Swirl Mbrot" "SummonerEye" "Gavarun" "MalinovskyDeco" "Multipowerbrot Even"
hint= "Fractal formula used for calculation. Mbrot here stands fro Mandelbrot."
endparam

float param power
caption="Power"
default=2
visible = (@formula == 0||@formula == 1||@formula == 3||@formula == 4||@formula == 6||@formula == 8||@formula == 9||@formula == 11||@formula == 12||@formula == 13||@formula == 14||@formula == 22||@formula == 25)
hint="Degree of formula."
endparam

int param starpower
caption="Star Power"
default=7
hint="Star sides = power-1"
visible = (@formula == 2)
endparam

float param unitvector
caption="Unit vector amount"
default=-0.5
hint="Coefficient N for z=z+N*z/|z|"
visible = (@formula == 6)
endparam

float param talisadd
caption="Talis addition"
default=1
hint="In Talis adds value to z z=z^2/(z+add). In another fomulas adds value in respective places. In Gavarun it is real part of complex power."
visible = (@formula == 1||@formula ==23||@formula ==24)
endparam

float param quadfactor
caption="Factor of x*y"
default=2.5
hint="2 is very celtic and 2 is very cosmic."
visible = (@formula == 7||@formula ==15)
endparam

heading
caption = "Pixel input Block"
endheading

float param sizescaling
caption = "Size Scale"
default = 1
hint="Scaling here works as zooming in or out."
endparam

float param srcWidth
caption = "Pixel source Width"
default = 5.0
hint="Input pixel area depends on width and height. Too much is waste of PC resources, not enough will mean that some fractal parts will dissapear. "
endparam
float param srcHeight
caption = "Pixel source Height"
default = 4.0
endparam

heading
caption = "Colour Block"
endheading

param palette
caption = "Colour Mode"
enum= "Direct Colouring" "Gradient Based" "Mixed Harmonic" "Fractal Explorer like" "Gradient by Harmonic"
default=0
hint= "Gradient Based is gradient calculated from green channel, gradient harmonic is gradient calc from mean of all channels. Mixed is harmonic mean between gradient colour (by mean of RGB) and RGB channels. Fractal Explorer like is RGB values calculated seperately from gradient. All exept direct colouring uses gradient and alpha channel."
endparam

param switchRGB
caption = "Switch Colours"
enum ="None" "Switch Red and Green" "Switch Red and Blue" "Switch Green and Blue"
default=0
hint= "Switch colour channels to change image tones in direct mode, so that don't need to change light and scalar of RGB."
endparam

float param ambient
caption = "Ambient Light"
default = 0.12
hint="Greyscale colour value of uniterated pixel. Result then is added / substracted from this."
endparam

param postfn
caption = "Transfer Function"
enum = "0- None" "1- Sin (periodic)" "2- Inverted" "3- Square Power (sharper)" "4- SinInverted (periodic)" "5- Accentuate RGB" "6- Solarisation (periodic)" "7- Hyperbolic Tangent"  "8- SineCosineMix (periodic)" "9- Haversine (periodic)"
default =  0
hint="The same as UF, but applied before colour mode, and works with direct colour. Periodic will colour white regions."
endparam

heading
caption = "Info"
text = "Version of Buddhabrot. Use with pixel aka no formula and wait. To increase render quality increase sample density. Difference from standart Buddhabrot is that this version don't test for escaping or non escaping orbits so it is mix of Buddhabrot and Antibuddhabrot, it have mixed mandelbrot and newton bailout and that RGB colours are calculated by Wave Trichrome method. It is alsou faster than most Buddhabrots. It is s suposed to work with plain direct colouring. If with large sample density it becomes too white try periodic transfer funtions. If with very large sample density and resolution it ceases to render, it's becouse fractal exceeded upper limit of integer numbers. http://www.fractalforums.com/fractal-programs/problems-with-implementing-budhabrot-in-uf/"
endheading

heading
caption = "RGB block"
endheading

float param lightR
caption = "Red light"
default = 0.38
endparam

float param scalarR
caption = "Red scalar"
default = 0.7
endparam

float param lightG
caption = "Green light"
default = 0.98
endparam

float param scalarG
caption = "Green scalar"
default = 1.6
endparam

float param lightB
caption = "Blue light"
default = 0.14
endparam

float param scalarB
caption = "Blue scalar"
default = 0.3
endparam
}

Alsou, here is good Buddhabrot links. Goolge search almoust allways gives fractalforums.
This one by ker2x looks great. Throught probably some post processing with reducing image size were used:
http://www.fractalforums.com/programming/some-buddhabrot-questions-techniques/ (http://www.fractalforums.com/programming/some-buddhabrot-questions-techniques/)

A 3D buddhabrot verson:
http://www.fractalforums.com/images-showcase-(rate-my-fractal)/orbits-inside/ (http://www.fractalforums.com/images-showcase-(rate-my-fractal)/orbits-inside/)

A nova buddhabrot and good discussion about weak point of buddhabrots:
http://www.fractalforums.com/images-showcase-(rate-my-fractal)/orbit-plotted-nova/ (http://www.fractalforums.com/images-showcase-(rate-my-fractal)/orbit-plotted-nova/)



Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 10, 2012, 08:08:53 AM
Some pics of mentioned.
A mandelbrot set with new bailout settings:
(http://www.ljplus.ru/img4/a/s/asdam/Brahmabrot_mandelbrot.jpg)

And closer with sine transfer. Blue are most dense areas:
(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_Mandelbrot_zoom.jpg)

Magnet2 buddha. Very complex throught not very dense:
(http://www.ljplus.ru/img4/a/s/asdam/Brahmabrot_magnetII_second.jpg)

Cubed Mandelbrot double turtle:
(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_mandelbrot_turtle.jpg)

Quadratic General. x=z^2+y^2+cx; y=2*x*y+cy:
(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_quadgen.jpg)

Swirlbrot. The same settings as above but magnets's bailout:
(http://www.ljplus.ru/img4/a/s/asdam/Brahmabrot_Swirlbrot.jpg)

Talis.
(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_Talis.jpg)

Fracmonks Even Multipowerbrot:
z=(((((z^2*c) +1 )^2) -1 )^2)
(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_multipowerbrot_2.jpg)


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 10, 2012, 09:05:59 AM
really nice stuff :)
The "quadratic general" interestingly looks a lot like "the attic", based on dual numbers.
(x+ye where e²=0 but e!=0)
((x+ye)²=x²+2xye)

The triplex variant I gave is simply the same basic naive approach to a triplex form that also gave rise to the original first triplex MSet, the original square MBulb as well as eventually all its later installments.


Title: Re: Problems with implementing Budhabrot in UF
Post by: matsoljare on December 10, 2012, 02:17:02 PM
The last three look very interesting, some more closeups perhaps?


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 13, 2012, 09:31:10 AM
Zoomed in in Talis and Swirlbrot buddhas of previous renders.

Zooming in talis was painfully slow and there still are some undersampling. So then I scaled Swirlbrot, what effectively works as zooming in, but scaling is much faster.

(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_Talis_zoom.jpg)

(http://www.ljplus.ru/img4/a/s/asdam/Brachmabrot_Swirlbrot_zoom2.jpg)

For a notice. You can zoom in in buddhabrot, or you can scale a buddhabrot, it generates identic result, but scaling is much faster becouse it requires less sampling for the same result.

p.s.
Do this will improve my karma?


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 13, 2012, 11:48:43 AM
What would be the difference between scaling and zooming?
Can you give a pseudo code example of each for comparison?


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 13, 2012, 01:06:55 PM
What would be the difference between scaling and zooming?
Can you give a pseudo code example of each for comparison?

It's this variable:
float param sizescaling
caption = "Size Scale"
default = 1
hint="Scaling here works as zooming in or out."
endparam

Im not absolutely shure how this works, it is retained variable from coppied code, but it works like scaling. sizescaling=2 means something like 2 x larger buddha. Maybe it's have something to do with more optimal use of source pixels or coloured are if compared with zoom. Maybe z=(z^2+c)/2 or z=z^2+c/2 or z=z^2/2 +c would do the same. Scaling should be conformal, so there shouln't be any distortions if compared with zoom.

The same image resolution, but a bigger fractal;) Result is like zooming in.


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 13, 2012, 02:01:41 PM
just using a factor on the equation? That might be it, yeah...


Title: Re: Problems with implementing Budhabrot in UF
Post by: matsoljare on December 13, 2012, 03:51:54 PM
Anyone tried using the Buddhabrot as a heigh map?


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 17, 2012, 12:31:11 PM
Probably no.
I bitt tested Buddhabrot scaling on my Brahmabrot version (speaking using keywords for ggle). Well, scaling is equaly slow as zooming in. Speed gain was only becouse of (resulting) less sample density. If sample density are equal, there is no speed advantages, so just forget scaling, I alsou removed it from formula, less coeffitients are better.
With less programming and free time at weekend I spend more time on rendering, so I got this:

Starbrot
z= z*0.5 - z^starpower + c
with starpower = 7
(http://www.ljplus.ru/img4/a/s/asdam/Starbrot_bluegreen.jpg)

Swirlbrot
z=(exp(flip( frequency*cabs(z)+spin*atan2(z)) ) *z )^power  +c
with power = 3  frequency=1.5  spin=2
(http://www.ljplus.ru/img4/a/s/asdam/Swirlbrot_Puffy.jpg)

Zoom in:
(http://www.ljplus.ru/img4/a/s/asdam/Swirlbrot_Puffy_zoomed.jpg)

p.s.
No photoshop, normalisation or postprocessing used for anything more than changing png to jpg. Trigonometric functions did their normalisation job well.
 


Title: Re: Problems with implementing Budhabrot in UF
Post by: kram1032 on December 17, 2012, 01:31:37 PM
Hmm... If you tweek the color-scheme and parameters, you might get something very christmassy. :)

What's the starpower?


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 20, 2012, 11:04:00 AM
Starpower -> star sides = polynomial power -1;) In 'normal' escape time fractal this formula with inverted c generated star like shapes. Getting colours you want  is not so easy with generated (direct) colours, but with gradient file it becomes noisy and looses it's cosmic appeal.

I saved orbit traps blog entries to read it in more relaxed home enviroment and then found interesting suprise :) It's pretty nice to be mentioned in blog with such great image picks, fractal knowledge and fluid language.
Quote
Buddhabrot_moshiahobrot_talis by Alef

This is from a FFs thread discussing Problems with implementing Budhabrot in UF.  There’s a whole bunch of interesting little “rough” images in it.  The Buddhabrot is a very captivating fractal as it often displays this kind of hazy but ordered kind of imagery.  The ghostly appearance and similarity to images of the Buddha have made this fractal an image class of its own.  The golden glow, the obedient sparks; something dharmic this way comes!

;Starbrot z= z*0.5 - z^5 + c Should zoom to 1/4 of this.
(http://www.ljplus.ru/img4/a/s/asdam/Starbrot_pow5.jpg)


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 26, 2012, 07:25:57 PM
Ryan D:
Nice videos. It develops like molten glass. Throught I'm not shure how this happens.


Well, buddhabrot in Chaos Pro/UF lacks multithreading. It is pretty impossible to have multi threading in UF colour formula. Multi threading instead of step by step could increase speed of render, as this PC don't seem much burdened by simulateounos buddhabrot renders. But alsou I could be wrong.

starbrot
starpower=5, star geometry =0.12
(http://www.ljplus.ru/img4/a/s/asdam/Starbrot_celtic.jpg)

p.s.
Now I'm thinking, is it possible to render buddhabrot with flame colour method? Its should be so. This is just slightly more advanced hits per pixel count. But something painting image according how it is hit, or from what orbit (region) it is hit. Buddhabrots probably looks as 3D becouse different orbits layers each other. But if would be turned into some meaningfull colour information.


Title: Re: Problems with implementing Budhabrot in UF
Post by: cKleinhuis on December 27, 2012, 12:24:05 PM
Surely can you apply the flame methods, just the point finding method differs from flames i asked thargor to include buddhas in his flame renderer but sadly enough themethods differ way to much. . . I would lovehaving a buddha as ifs flame transform

So, whenit comes down to color correction using log methods for widespread countingvalues it fits perfectlyto apply themethods from classicflames :)


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on December 30, 2012, 04:20:22 PM
Buddhabrots have some simmilarities with flames, orbit density log plot. IMHO, it could use flames engine, but pixel hits could be generated not bu IFS, but by Buddhabrot method. That is IFS part switched with Buddhabrot, and colour part stays the same. Probably there are  difference extends in values extends.

In 0>1> region logarithms are useless and hyperbolic tangent works as logarithmic scale.

Fractal Flames algorithm claims that it colours flames according to internal structure of hits, latest hits are more important and alsou it depends from what region came hit. There alsou are something called Density Estimation. Maybe that could be used to smooth buddhabrots.

(http://nocache-nocookies.digitalgott.com/gallery/13/5956_30_12_12_4_13_10.jpeg)
http://www.fractalforums.com/index.php?action=gallery;sa=view;id=13072 (http://www.fractalforums.com/index.php?action=gallery;sa=view;id=13072)


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on June 15, 2013, 03:36:22 PM
Since this is main thread, here I link this thing together.

In short algorith is mutation of buddhabrot:
with colours generated by three colour waves, no throwing out escaping or non escaping orbits so it's faster than proper buddhabrot, and magnet (both convergent divergent) bailout.

Julia like version of this:
http://www.fractalforums.com/mandelbrot-and-julia-set/buddhabrot-quasijulia-set/ (http://www.fractalforums.com/mandelbrot-and-julia-set/buddhabrot-quasijulia-set/)

More high quality pictures with equalisation using sigmoid function:

http://www.fractalforums.com/images-showcase-(rate-my-fractal)/brahmabrot-(halfway-tobuddhabrot)-equalisated/ (http://www.fractalforums.com/images-showcase-(rate-my-fractal)/brahmabrot-(halfway-tobuddhabrot)-equalisated/)

(http://nocache-nocookies.digitalgott.com/gallery/13/thumb_5956_01_05_13_6_49_37.jpeg)
Very large image of rendering formula z=z^2+c;   z=z - 0.375*z/|z| ;
http://www.fractalforums.com/index.php?action=gallery;sa=view;id=13986 (http://www.fractalforums.com/index.php?action=gallery;sa=view;id=13986)

(http://nocache-nocookies.digitalgott.com/gallery/14/thumb_5956_31_05_13_3_04_59.jpeg)
Layered image
http://www.fractalforums.com/index.php?action=gallery;sa=view;id=14157 (http://www.fractalforums.com/index.php?action=gallery;sa=view;id=14157)

Everything of this is in Ultra Fractal -> EM.ucl -> z Brahmabrot  or Chaos Pro - colouring -> buddhabrot -> brahmabrot.

And in Chaos Pro is a latest C++ code of algorithm: http://www.chaospro.de/formulas/display.php?fileid=238 (http://www.chaospro.de/formulas/display.php?fileid=238)


Title: Proudly notice
Post by: hgjf2 on June 28, 2013, 08:56:20 AM
Nice artistic pastelation of color for those fractals whick are good to send to NIRVANA
 :peacock: :sphappy: :cantor_dance: :wow:


Title: Re: Problems with implementing Budhabrot in UF
Post by: Alef on June 29, 2013, 07:15:34 PM
Thanks hgjf2. :spgloomy:

Adding video, so that everything is in one thread.
http://www.youtube.com/watch?v=y7Gf-UxqJCI (http://www.youtube.com/watch?v=y7Gf-UxqJCI)


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on September 05, 2013, 07:39:11 PM
As I said, one of reason behind this was to make something like model for a bunch of featurless buddhabrot softwares.
Rendered couple of images.

Two rosy/orange/appricot gradient based images. Less smooth colour change but more control:

(http://fc07.deviantart.net/fs70/f/2013/248/7/8/gradient_brahmabrot_central_by_edo555-d6l4bd8.jpg)


(http://fc01.deviantart.net/fs71/f/2013/248/b/a/gradient_brahmabrot_quadgen_by_edo555-d6l4bha.jpg)


formula:
If (|z| < |c|)
z= (z)^4+ c
else if (|z| == |c|)
z= (z)^4
else
z= (z)^4 - c
endif

Much more interesting as orbit plots than as escape time formula.
(http://fc04.deviantart.net/fs71/f/2013/248/5/9/turtle_pow4_brahmabrot_by_edo555-d6l4bmg.jpg)


And a couple of zoomed in quasi julias with starting z = pixel and c = julia seed + pixel //pixel being random value.
Normal julia sets have very boring orbit plots, but here one can zoom in and discover some cool fractal shapes. Some even resamble used fractal shapes.

(http://fc02.deviantart.net/fs71/f/2013/248/d/b/brahmabrot_celtic_quasijulia_by_edo555-d6l4aj3.jpg)


(http://fc01.deviantart.net/fs70/f/2013/248/a/3/brahmabrot_rotatedmandelbrot_quasijulia_by_edo555-d6l4asl.jpg)


(http://fc04.deviantart.net/fs70/f/2013/248/f/4/brahmabrot_royalm_quasijulia_by_edo555-d6l4b1e.jpg)



(http://fc02.deviantart.net/fs70/f/2013/248/8/1/brahmabrot_talisiter_quasijulia_by_edo555-d6l4b7u.jpg)



Now resolution and quality of video should be much better.

http://www.youtube.com/watch?v=rg3RDEjIDHE&feature=youtu.be (http://www.youtube.com/watch?v=rg3RDEjIDHE&feature=youtu.be)


Vimeo just converted

https://vimeo.com/73902489 (https://vimeo.com/73902489)

Ultra Fractal save files are in attachment (they weren't picked by their speed and it don't works 2x faster with 2x better PC).


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Nahee_Enterprises on September 06, 2013, 06:44:03 AM
    As I said, one of reason behind this was to make something like model for a bunch of featurless buddhabrot softwares.
    Rendered couple of images.
    Two rosy/orange/appricot gradient based images. Less smooth colour change but more control:
    Much more interesting as orbit plots than as escape time formula.
    And a couple of zoomed in quasi julias with starting z = pixel and c = julia seed + pixel //pixel being random value.
    Normal julia sets have very boring orbit plots, but here one can zoom in and discover some cool fractal shapes.
    Some even resamble used fractal shapes.
    Now resolution and quality of video should be much better.
    Vimeo just converted
    Ultra Fractal save files are in attachment (they weren't picked by their speed and it don't works 2x faster with 2x better PC).

Wow, seven different images and a video to top it all off with !!!!    And all posted in one day within a single post!!!     :D
 


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: 3dickulus on September 06, 2013, 07:26:22 AM
Spectacular! kind of like seeing Hubble images for the first time.


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: ker2x on September 06, 2013, 07:48:53 AM
Alef : Most of fractal i can see (and i can't see much, blame your hoster) are actually anti-buddhabroth, isn't it ?


Title: Re: Problems with implementing Budhabrot in UF
Post by: ker2x on September 06, 2013, 08:12:17 AM
Anyone tried using the Buddhabrot as a heigh map?

The buddhabrot is very noisy, an heightmap would be just ugly spike


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Sockratease on September 06, 2013, 12:01:47 PM
Wow, seven different images and a video to top it all off with !!!!    And all posted in one day within a single post!!!     :D

I think the key phrase there is "within a single post!"

The complaints which brought about the gallery limits were based on flooding the recent posts section and pushing discussions back pages at a shot.

This, being "within a single post" does not have that effect.  It's just one post.

The Gallery is different than the forum, but the same general effect is sought - not flooding the recent posts section and burying other people's discussions.

So this is fine as far as I can see. 

Sorry for any confusion or inconvenience this may have caused you, Paul.

I agree the forum guidelines are not all in any one place and easy to find -  it's not limited to this one type thing, and much work is needed.  Perhaps we should get the staff together and rectify this!

Sorry to go off topic in your thread there, Alef.  I do find the images intriguing and appreciate what you are trying to do with our Buddy, the Bhuddabrot   O0


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Nahee_Enterprises on September 06, 2013, 12:16:26 PM
    The complaints which brought about the gallery limits were based on flooding the
    recent posts section and pushing discussions back pages at a shot.
    The Gallery is different than the forum, but the same general effect is sought -
    not flooding the recent posts section and burying other people's discussions.

    I agree the forum guidelines are not all in any one place and easy to find - it's not limited to this
    one type thing, and much work is needed.  Perhaps we should get the staff together and rectify this!

First of all, I do not believe that four or five posted images to be a "flood", even if they are in separate postings.  I do not even think two separate image postings to be a "flood".

But there were recent multiple posts each having images and/or videos, and by more than one member.  It goes on all the time, but apparently some people are never called out about it.  The constant double standards that take place is why so many others in the past have gotten so upset and left the forum complaining about such things as "Nazi" tactics.
 


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: ker2x on September 06, 2013, 06:25:39 PM
You think regular buddhabrot are boring & featureless and i disagree.
Exploring new fields and doing R&D is good, very good but, omho, nothing beat z = z˛+c, yet.
But please never stop trying.

Direct from WinBuddha-v0.3 without postprocessing.
(http://fractals.s3.amazonaws.com/buddhabrot/hop8.png)


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on September 07, 2013, 03:55:28 PM
ker2x Direct from WinBuddha-v0.3 without postprocessing:

Great render. Buddhabrots allways gives feeling of  something from a space or maybe a clouds.

Quote
nothing beat z = z˛+c, yet.
Actualy second image and formula of the video are quad gen what is a z^+c but with i*i=1. Maybe it's split complex numbers. In video throught I chanced coeficient for imaginary part, from y=2*x*y to something like y=-1*x*y. So it's still a z*z+c.

Quote
Alef : Most of fractal i can see (and i can't see much, blame your hoster) are actually anti-buddhabroth, isn't it ?
I thowed out all the testing for escaping vs non escaping alltogether and then to lessen the most uninteresting central orbits I introduced convergent bailout. So It's 75% anti and 25 % buddhabrot but it depends on formula.


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on September 07, 2013, 03:56:56 PM
Here is buddha heightmap.
http://www.fractalforums.com/landscapeterrain-generation/buddhabrot-as-heightmap/ (http://www.fractalforums.com/landscapeterrain-generation/buddhabrot-as-heightmap/)


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: ker2x on September 08, 2013, 12:46:35 PM
Here is buddha heightmap.
http://www.fractalforums.com/landscapeterrain-generation/buddhabrot-as-heightmap/ (http://www.fractalforums.com/landscapeterrain-generation/buddhabrot-as-heightmap/)

A good MMORPG map  ;D


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: kram1032 on September 08, 2013, 01:20:06 PM
Is the height a function of point density (e.g. brightness) or how does this work?


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on September 16, 2013, 06:17:02 PM
Yes, heightmap is when the height is put as brightness (value). This was a lot used for a 3D fractals befora a mandelbulb era http://www.eclectasy.com/Fractal-Explorer/gal3dl01.htm (http://www.eclectasy.com/Fractal-Explorer/gal3dl01.htm)

Rendered image using a Manowar formula (z = z^2 + zold + c). zold is used in bailout so this formula comes naturaly. Colours are a RGB harmonic mean of directly generted colours and the colour by Ultra Fractal gradient, coz harmonic mean better preserves contrast (low values).

Kind of like funny symmetric points in inside (I don't meant a random dots), throught not shure what they represents.  Orbits sould be smoothly distributed and should not jump on to these spots. These points alsou appears in mandelbrot renderings, especialy with small maximum iterations value. Maybe z orbital values + orbit density create some peak values, or maybe these are points where z -> 0. Exponent smoothing generates dots around z= 0 throught don't think that there should be z=0 .

(http://fc09.deviantart.net/fs71/i/2013/259/2/3/manowar_brahmabrot_by_edo555-d6mjhx6.jpg)

There is one more pic, but it renders quite a long, maybe it woun't finish. But at least my image sharing site is back.


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on October 26, 2013, 03:50:10 PM
Tried to orbit plot something like mandelbox. A swirlbox ;.)
;in complex numbers and with a complex scaling.
z =z+ abs(real(z)-1) - abs(real(z)+1) + flip(  abs(imag(z)-1) - abs(imag(z)+1) )
z=z*@centralorbit
z=exp(flip( @frequency*cabs(z)+ @spin*atan2(z)) ) *z   +c

Orbits are simple as expected but in certain range of scales (0<|scale|<1) it generates nice ornaments. Hadn't tested with spherefold (normal mandelbox).

(http://fc05.deviantart.net/fs71/f/2013/299/8/b/swirlbox_formula_brahmabrot_1_by_edo555-d6ruudb.jpg)



(http://fc02.deviantart.net/fs71/f/2013/299/2/0/swirlbox_formula_brahmabrot_2_by_edo555-d6ruuwy.jpg)



(http://fc03.deviantart.net/fs71/f/2013/299/f/7/swirlbox_formula_brahmabrot_3_by_edo555-d6ruvic.jpg)



(http://fc00.deviantart.net/fs71/f/2013/299/d/1/swirlbox_formula_brahmabro_4_by_edo555-d6ruvx9.jpg)



(http://fc03.deviantart.net/fs70/i/2013/299/5/a/swirlbox_formula_brahmabrot_5_by_edo555-d6ruwdk.jpg)


Mandelbrot with orbit plot insides. Somehow orbits don't follow mandelbrot outline but fits in all the positions. Still, the most interesting question is a nature of points inside:
(http://fc03.deviantart.net/fs70/f/2013/299/2/7/mandelbrot_inside_mandelbrot_by_edo555-d6rux6n.jpg)


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: kram1032 on October 28, 2013, 12:07:34 AM
Those are some nice swirl brots.
They look like some kinds of swirly fireworks!


Title: Re: Brahmabrot a simplified and expanded Buddhabrot
Post by: Alef on October 28, 2013, 05:18:44 PM
Thanks Kram. Pickover popcorn looked like to much sins and other functions so did this.

Few more orbit plot vs mandelbrot shape.
Power 3 and pow 5 mandelbrot set with orbit plot insides. Orbits somewhat follows mandelbrot. More misterious concentric points, hadn't noticed these in buddhabrots and antibuddhabrots, no idea what they are.

(http://fc09.deviantart.net/fs71/f/2013/301/0/f/orbit_plot_vs_mandelbrot_pow3_by_edo555-d6s4ym1.jpg)


(http://fc06.deviantart.net/fs71/f/2013/301/1/c/orbit_plot_vs_mandelbrot_pow5_by_edo555-d6s4z9b.jpg)

In attachment Ultra Fractal parameter files of this and previous post.