Logo by S Nelson - Contribute your own Logo!
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. August 18, 2017, 02:38:57 PM


Login with username, password and session length



Pages: [1] 2 3 ... 5   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: Brahmabrot a simplified and expanded Buddhabrot  (Read 8770 times)
Description: EX: Problems with implementing Budhabrot in UF
0 Members and 1 Guest are viewing this topic.
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« 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+HTUDkntzrYCC1/c6jocu4bL/FU1yiQ9MlWjLbbW+wZSt7WaOB4Mw9U1o3m+tRn
  Co6D8dZ9GAnJloQ9kFJC2nDuwISuvO/ntJd3LnoFEVB9vZzfSUzZ58QaEpZNampd5B7FFRu0
  MFEAnAWZ/qSsT+O1a1E1J6dyyb7cFpFh6svT/Lx+QgWG5dnlS9FFnpphGVHvXUJPecBNfPMj
  LqESxxyyFCJnPdWNxdoq8jiFi7+XHlV0tw8B6teShc1y1zXZJNf/FYl6QoK=
}

Moshiahobrot.ucl:Moshiahobrot {
;code mostly taken from Susan D. Chambless buddhabrot.
::ErszGin21qVevttRW8/OGwfHeQe3uiSyyW2xNZriW4yYHVDEnmVud3GUkAMickE3QRqSSFLJ
  kP87v3cQOUHuF7hCiF58On39M2Hf0f6mbfzdv7W6m7Gd7r/pjPaac6YR83d8RHf0k4URBJSK
  iijmOrY0gendt+pdgNsE2wdg5XCz/4jIKKpgylyQaARZikw05NfxLehHR9pH4lnkmZWnSWOf
  sMLnpqva9g040l6FISLmQRhAa22LNc3l85l0Ly6wiHjYdoIbZSQzTwLFz8cgObaRF0ZSW9Vg
  VKzlkILTsOXpUjGq2XaBtIa1oftGP7UnHfk3LpTmkHkJlJU0cxUZNyH+fH5+/HQOzgg05Lil
  ro40ARRUaS+ve9cxqoCZ2HJ9n+s5PWGUUhj1fGkwGrzpD9pP9200Fg+lJFGHKT2KmoOqHXvL
  9bRE9NMiypSOMINLMvabvKQFMJFxNPJQyY75wlHCExRJTBVJ5FIq0hw1MhnyWhSCrAmHlIAY
  8VzTEJTjlOwCSzZY4rdhV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sEY0UtnOwko2dnWidpvHKqclcRh5sfGdgbDrm1t2RTUDVa1it7jYyfMHWteYwDqVp
  Rmj36D9z1FZaubdT7B7qt+TUap8XPmjk/e9a0b3pK/5dv4K3cY0C1Y/tGOmFqu+qfrF6m+tp
  enV975ordQN2VZomHeFNcXAtMnAHYi7QxowQuaKn805yHnJxwYneR3r2vVsao862x3VuuJ5J
  ffmR3MdTWpt+pzrXU/V+gQaHQjRy5p8A4LTM6h6+Iw8x8FWOBzmlcaZYBOl8s0wn0tY/LowZ
  fwu2494RexTMZg+KI3hN61/jzH7fzGOsZoKXfX9pX3L+90n9xo9oRPJns/li4O4KbvjPQI7T
  rR7hR71EVnT/bAwg7SH=
}


* buddhabrot_m1.jpg (22.42 KB, 312x343 - viewed 1359 times.)
* Moshiahobrot.ucl (8.85 KB - downloaded 166 times.)
« Last Edit: August 29, 2013, 06:38:34 PM by Alef » Logged

fractal catalisator
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #1 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.

* Moshiahobrot.ucl (9.33 KB - downloaded 165 times.)

* Buddhabrot_moshiahobrot_Mbrot.jpg (57.94 KB, 539x435 - viewed 567 times.)

* Buddhabrot_moshiahobrot_talis.jpg (129.28 KB, 640x480 - viewed 616 times.)
Logged

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


formerly known as 'Trifox'


WWW
« Reply #2 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!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #3 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.
« Last Edit: November 27, 2012, 03:53:19 PM by Alef » Logged

fractal catalisator
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #4 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.


* MoshBuddh_Mbrot_1.jpg (71.82 KB, 497x393 - viewed 1397 times.)

* MoshBuddh_Mbrot_2.jpg (68.33 KB, 491x393 - viewed 1406 times.)

* MoshBuddh_8thmodulus_1.jpg (68.19 KB, 535x389 - viewed 579 times.)
* Moshiahobrot.ucl (10.47 KB - downloaded 164 times.)
« Last Edit: November 28, 2012, 10:03:03 AM by Alef » Logged

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


formerly known as 'Trifox'


WWW
« Reply #5 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 ....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #6 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



z=z/2-z^6 +c


z=z^2+c
z=z - 0.5* z/cabs(z)
Logged

fractal catalisator
kram1032
Fractal Senior
******
Posts: 1856


« Reply #7 on: November 29, 2012, 03:42:38 PM »

haha, wow, it's a bomb, a fat star and a fat BBrot.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #8 on: November 29, 2012, 03:43:50 PM »

no, the first one is a fish wink
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #9 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
  BMKJERymrhbdnlwdGJ5kjHD3lEVEhL29Cdqg05UmAKEUEnDPGhLwExmiM/Ylf5Ai2HXGhaxt
  wPDyAUZGH21T+TJC7IEk6ZJYQmZZ7ZwuPjIfr/qZRoS0awpfrB9acQaq3B9AV6SRSILBynoo
  jt6B1DRDgPzmT4t+RJ6EGkaljk5UH04lWfIDjhCVZlIXH5iT7DxmKZcrSDHNHkEDJbWNDtXR
  5QRaKE7ntQcGEG9QU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jPBkrEkCD1MezEFPSzSJfkqq246wqR7O6+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.

* Moshiahobrot.ucl (13.41 KB - downloaded 162 times.)
« Last Edit: December 03, 2012, 01:02:34 PM by Alef » Logged

fractal catalisator
Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #10 on: December 03, 2012, 11:46:17 AM »

Here are pics

z = (sqr(z)*(35 * sqr(z) - 30) + 3) / 8 + c




z= abs(z^3*iter*0.05)+c
iter=iter+1




Rotated by 90 degrees.
z=z^2*iter*0.05 +c
iter=iter+1




z= conj(z^-4*iter*0.05)+c
iter=iter+1




PerpendicularMandelbrot
z=sqr(real(z)) - sqr(imag(z)) -flip(2*imag(z)*abs(real(z))) + c

Logged

fractal catalisator
kram1032
Fractal Senior
******
Posts: 1856


« Reply #11 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.
« Last Edit: December 03, 2012, 06:37:11 PM by kram1032 » Logged
Ryan D
Alien
***
Posts: 36


WWW
« Reply #12 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

<a href="http://vimeo.com/moogaloop.swf?clip_id=49018096&amp;amp;server=vimeo.com&amp;amp;fullscreen=1" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=49018096&amp;amp;server=vimeo.com&amp;amp;fullscreen=1</a>

<a href="http://vimeo.com/moogaloop.swf?clip_id=49084660&amp;amp;server=vimeo.com&amp;amp;fullscreen=1" target="_blank">http://vimeo.com/moogaloop.swf?clip_id=49084660&amp;amp;server=vimeo.com&amp;amp;fullscreen=1</a>
Logged
fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #13 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. cheesy
Logged

Alef
Fractal Supremo
*****
Posts: 1124



WWW
« Reply #14 on: December 05, 2012, 09:21:52 AM »

Whose Class Switch are you using? Mine and Dave Makin's are substantially different. cheesy
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.



Lines should be of not enought area of pixel sampling.



 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
« Last Edit: December 05, 2012, 09:39:55 AM by Alef » Logged

fractal catalisator
Pages: [1] 2 3 ... 5   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Brahmabrot (halfway toBuddhabrot) equalisated Images Showcase (Rate My Fractal) Alef 9 1079 Last post May 30, 2013, 05:12:18 PM
by Alef
Brahmabrot animated Movies Showcase (Rate My Movie) Alef 0 354 Last post June 29, 2013, 07:28:30 PM
by Alef
Logic Turtle Brahmabrot Images Showcase (Rate My Fractal) Alef 4 623 Last post September 14, 2013, 03:09:06 PM
by Alef
Simplified startup for Mac users: JWildfire V1.03 JWildfire thargor6 1 640 Last post October 14, 2013, 01:01:21 AM
by Nahee_Enterprises
Brahmabrot orbit plot anim Movies Showcase (Rate My Movie) Alef 5 287 Last post May 16, 2017, 04:40:42 PM
by Alef

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.198 seconds with 27 queries. (Pretty URLs adds 0.016s, 2q)