Logo by tomot - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. April 19, 2024, 07:21:10 PM


Login with username, password and session length


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


Pages: 1 [2]   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: Buddhabrot  (Read 6826 times)
0 Members and 1 Guest are viewing this topic.
kram1032
Fractal Senior
******
Posts: 1863


« Reply #15 on: June 06, 2015, 01:23:57 PM »

A second one. (Click the image for some extra information/larger view)



This time, I used the following settings:
  • preiterations: 10000
  • blue iterations: 46416
  • green iterations: 215443
  • red iterations: 1000000

(I chose those values such that they are logarithmically evenly distributed)
Logged
Caleidoscope
Fractal Fertilizer
*****
Posts: 365



WWW
« Reply #16 on: June 06, 2015, 02:08:00 PM »

Again a precious gem. Still very different from the other one. Makes me think of artistic Chakra's.
Great picture.
Logged

"Today you create the memory for tomorrow, be sure to make it a good one"
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #17 on: June 06, 2015, 05:10:32 PM »

can you please try something out ?

what i dont like with the buddhabrots is the randomness of the catched orbits,
can you try this?

if a long period that bails out is found, e.g. more than 1million, take that location and use a miniminimi radius around that starting value and draw in the budhabrot orbits of those
Logged

---

divide and conquer - iterate and rule - chaos is No random!
kram1032
Fractal Senior
******
Posts: 1863


« Reply #18 on: June 06, 2015, 05:42:47 PM »

you mean to make sure that the whole thing is filled more evenly?
I feel like part of this rendering style specifically is the unevenness of it. But it sounds like a nice experiment. I wonder what nice values for a "miniminimi" radius would be. Do you think 1.e-3 would be close enough?

EDIT: Ok I launched an experiment. I hope this is not an infinite loop now: As currently implemented, it will do a random walk around anything that's still inside the set and it'll continue to do so until:
either it has found a point that DOES diverge
or it has gone a previously specified number of steps.
(I made it finite since, with a random walk, it might be that it just runs right into the regions that DON'T escape and thus it'd go on practically forever which would... not help.)
We'll see what this does. Currently I'm using the adhoc chosen trial depth of 2 steps and a random radius between 0 and 1.e-3 for my steps.
Since this actually KEEPS running after whenever it needs the LONGEST and on top of that it will find a point close to that which has a sizeable chance to ALSO be amongst those points that take the longest, I expect this to take FOREVER to render. But we'll see.

EDIT: ugh. I think I really need to refactor my code to make it work right. Currently I have to be REALLY careful with what I do. One wrong step and POW, it somehow renders an antibuddhabrot instead of a buddhabrot. The change I did, did just that. I think I need to reorganize my loops a bit for this to work. Such a change is LONG overdue and I'm working on making that happen now. Though it'll take a bunch of time before I get anything out of those changes, so if somebody else would like to try this, please do.
« Last Edit: June 06, 2015, 06:48:14 PM by kram1032 » Logged
tit_toinou
Iterator
*
Posts: 192


« Reply #19 on: June 08, 2015, 12:32:48 AM »

Nice images kram1032 !

Sorry for not answering I just saw your posts...

what kinds of values are you using for these?
If I understood correctly, what you are doing is that you only look at a fairly narrow range of iteration counts, only even beginning to plot them at high values.
So what is the minimum value of iterations you consider in these images? I'm currently trying a classical BBrot image with:
  • 1000 pre-iterations
  • 10000 steps before the blue channel bails out
  • 100000 steps before the green channel bails out
  • 1000000 steps before the red channel bails out

And I further restrict the initial selected points such that both the initial point and the first iteration are inside the circle of radius 4 but neither in the main period-1-cardioid nor in the circle of period 2 to ensure that the selected points are at least reasonably close to the border of the set.
Is there anything else you are doing besides that? What are your choices for the various values?
I think Berdes was using 1k-10k (red) / 10k-100k (yellow) / 100k-1000k (white).
Checking the cardiod and biggest circle is a good idea. You can also implement a simple periodicity checking algorithm.
No nothing else is done !
Another better buddhabrot he made :

you mean to make sure that the whole thing is filled more evenly?
I feel like part of this rendering style specifically is the unevenness of it. But it sounds like a nice experiment. I wonder what nice values for a "miniminimi" radius would be. Do you think 1.e-3 would be close enough?

I understand cKleinhuis ' idea. I had the same. I feel like points close to each others yield orbits that look alike.
I think the radius has to be proportional to the distance to the set. You can crunch it with this formula http://iquilezles.org/www/articles/distancefractals/distancefractals.htm.




My friend gave me a file with the list of points of the orbit, I plotted it :

5 million iterations plotted at the upper left. The others things are enlargement of bulbs rotated and scaled. It appears that they are linked by a simple conformal transformation z->az+b strange....

Red was added for the first third of the orbits (iteration < 5 million / 3), green was added for the second third of the orbits and blue was added for the last third.

Discovers :
  • All bulbs are explored at the same time
  • Blue : Border of circles are made at the end of the orbit just before it bails out
  • Cyan (green+blue) : Inner border of circles are made by points by 2/3 and 3/3 but not 1/3
  • There is no magenta : the points at the beginning and at the end don't overlap
  • Yellow (red+green) : indicates that the first third and the second third iterations overlap to make the outer border of the weird bulbs
  • Red : The first iterations draw the inner border of the weird bulbs
Logged

ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #20 on: June 08, 2015, 02:56:12 PM »

Cardiod and circle check in this function :

Code:
PURE FUNCTION notInMset(c, n_max)
  COMPLEX, INTENT(IN) :: c
  INTEGER, INTENT(IN) :: n_max
  INTEGER :: n
  COMPLEX :: z
  LOGICAL :: notInMSet
  z = CMPLX(0,0)
  n = 0
  IF(((ABS(c - CMPLX(-1,0) )) < 0.25) .OR. ((ABS( 1.0 - SQRT(1-(4*c)) ))  < 1.0 ) ) THEN
    notInMset = .FALSE.
  ELSE
    DO WHILE (ABS(z) < escapeOrbit .AND. (n < n_max))
      z = z**zpower + c
      n = n + 1
    END DO
 
    IF (n >= n_max) THEN
      notInMset = .FALSE.
    ELSE
      notInMset = .TRUE.
    END IF
  END IF
END FUNCTION notInMset

Or some other (similar) code in C++ :

Code:
    //Quick rejection check if c is in 2nd order period bulb
     if( (cr+1.0) * (cr+1.0) + ci2 < 0.0625) return -1;

     //Quick rejection check if c is in main cardioid
     double q = (cr-0.25)*(cr-0.25) + ci2;
     if( q*(q+(cr-0.25)) < 0.25*ci2) return -1;


     // test for the smaller bulb left of the period-2 bulb
     if (( ((cr+1.309)*(cr+1.309)) + ci*ci) < 0.00345) return -1;

     // check for the smaller bulbs on top and bottom of the cardioid
     if ((((cr+0.125)*(cr+0.125)) + (ci-0.744)*(ci-0.744)) < 0.0088) return -1;
     if ((((cr+0.125)*(cr+0.125)) + (ci+0.744)*(ci+0.744)) < 0.0088) return -1;

And some old openCL code :

Code:
bool isInMSet(
    float cr,
    float ci,
    const uint maxIter,
    const float escapeOrbit)
{
    int iter = 0;
    float zr = 0.0;
    float zi = 0.0;
    float ci2 = ci*ci;
    float temp;
    //Quick rejection check if c is in 2nd order period bulb
    if( (cr+1.0) * (cr+1.0) + ci2 < 0.0625) return true;
    //Quick rejection check if c is in main cardioid
    float q = (cr-0.25)*(cr-0.25) + ci2;
    if( q*(q+(cr-0.25)) < 0.25*ci2) return true;
    // test for the smaller bulb left of the period-2 bulb
    if (( ((cr+1.309)*(cr+1.309)) + ci*ci) < 0.00345) return true;
    // check for the smaller bulbs on top and bottom of the cardioid
    if ((((cr+0.125)*(cr+0.125)) + (ci-0.744)*(ci-0.744)) < 0.0088) return true;
    if ((((cr+0.125)*(cr+0.125)) + (ci+0.744)*(ci+0.744)) < 0.0088) return true;
    while( (iter < maxIter) && ((zr*zr+zi*zi) < escapeOrbit) )
    {
        temp = zr * zi;
        zr = zr*zr - zi*zi + cr;
        zi = temp + temp + ci;
        iter++;
    }
    if( iter < maxIter)
    {
        return false;
    } else {
        return true;
    }
}
//Main kernel
__kernel void buddhabrot(
    const float realMin,
    const float realMax,
    const float imaginaryMin,
    const float imaginaryMax,
    const uint  minIter,
    const uint  maxIter,
    const uint  width,
    const uint  height,
    const float escapeOrbit,
    const uint4 minColor,
    const uint4 maxColor,
    __global float2* randomXYBuffer,
    __global uint4*  outputBuffer)
{
    float2 rand = randomXYBuffer[get_global_id(0)];   
    const float deltaReal = (realMax - realMin);
    const float deltaImaginary = (imaginaryMax - imaginaryMin);
    //mix(a,b,c) = a + (b-a)*c //(c must be in the range 0.0 ... 1.0
    //float cr = realMin + rand.x * deltaReal ;
    //float cr = realMin + (realMax - realMin) * rand.x ;
    //float ci = imaginaryMin + rand.y * deltaImaginary ;
    float cr = mix(realMin, realMax, rand.x);
    float ci = mix(imaginaryMin, imaginaryMax, rand.y);
    int x, y;
    int iter   = 0;
    float zr   = 0.0;
    float zi   = 0.0;
    float temp = 0.0;
    if( isInMSet(cr,ci, maxIter, escapeOrbit) == false)
    {   
        while( (iter < maxIter) && ((zr*zr+zi*zi) < escapeOrbit) )
        {
            temp = zr * zi;
            zr = zr*zr - zi*zi + cr;
            zi = temp + temp + ci;
            x = ((width) * (zr - realMin) / deltaReal);
            y = ((height) * (zi - imaginaryMin) / deltaImaginary);
            if( (iter > minIter) && (x>0) && (y>0) && (x<width) && (y<height) )
            {
                if( (iter > minColor.x) && (iter < maxColor.x) ) { outputBuffer[x + (y * width)].x++; }
                if( (iter > minColor.y) && (iter < maxColor.y) ) { outputBuffer[x + (y * width)].y++; }
                if( (iter > minColor.z) && (iter < maxColor.z) ) { outputBuffer[x + (y * width)].z++; }
            }
            iter++;
        }
    }
}
__kernel void xorshift(
    uint s1,
    uint s2,
    uint s3,
    uint s4,
    const int bufferSize,
    __global float2* randomXYBuffer
)
{
    uint st;
    float2 tmp;
    for(int i=0; i < bufferSize; i++)
    {
        st = s1 ^ (s1 << 11);
        s1 = s2;
        s2 = s3;
        s3 = s4;
        s4 = s4 ^ (s4 >> 19) ^ ( st ^ (st >> 18));
        tmp.x = (float)s4 / UINT_MAX;
        st = s1 ^ (s1 << 11);
        s1 = s2;
        s2 = s3;
        s3 = s4;
        s4 = s4 ^ (s4 >> 19) ^ ( st ^ (st >> 18));
        tmp.y = (float)s4 / UINT_MAX;
        randomXYBuffer[i] = tmp;
    }
}

Logged

often times... there are other approaches which are kinda crappy until you put them in the context of parallel machines
(en) http://www.blog-gpgpu.com/ , (fr) http://www.keru.org/ ,
Sysadmin & DBA @ http://www.over-blog.com/
kram1032
Fractal Senior
******
Posts: 1863


« Reply #21 on: June 08, 2015, 03:17:56 PM »

yeah I did that already. Not hard to do smiley
Logged
Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #22 on: June 08, 2015, 04:37:19 PM »

Quite a good. Nice colours of each image, not too alien as original.
Logged

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

Related Topics
Subject Started by Replies Views Last post
3D Buddhabrot 3D Fractal Generation David Makin 1 4186 Last post January 12, 2008, 02:36:31 PM
by twinbee
Relatively new to here, my Buddhabrot Images Showcase (Rate My Fractal) aluminumstudios 1 4392 Last post February 15, 2010, 11:49:43 AM
by Nahee_Enterprises
BuddhaBrot! Images Showcase (Rate My Fractal) « 1 2 » emmmile 17 7727 Last post June 22, 2010, 11:53:15 PM
by Nahee_Enterprises
Buddhabrot on GPU Programming « 1 2 ... 6 7 » ker2x 97 38069 Last post April 03, 2011, 11:58:16 PM
by ant123
High detail Buddhabrot - "Buddhabrot Echos" Images Showcase (Rate My Fractal) aluminumstudios 4 3630 Last post December 13, 2012, 04:42:29 PM
by tit_toinou

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