Welcome to Fractal Forums

Fractal Art => Images Showcase (Rate My Fractal) => Topic started by: ker2x on December 04, 2010, 12:59:08 AM




Title: Buddhabrot Gold and Sky
Post by: ker2x on December 04, 2010, 12:59:08 AM
A work in progress with my rewritten openCL code :

(http://fractals.s3.amazonaws.com/buddhabrot/buddha-gold-and-sky.jpg)


Title: Re: Buddhabrot Gold and Sky
Post by: ker2x on December 04, 2010, 01:48:28 AM
final version (including some histogram correction in gimp, i still have to code it in my opencl code):
(http://fractals.s3.amazonaws.com/buddhabrot/buddha-gold-and-sky-2.jpg)


Title: Re: Buddhabrot Gold and Sky
Post by: The Rev on December 04, 2010, 02:06:56 AM
Nice.  It looks very much like a nebula.  Perhaps you have created the first Hubblebrot?

The Rev


Title: Re: Buddhabrot Gold and Sky
Post by: lycium on December 04, 2010, 08:20:07 AM
very nice image ker2x!

i'm curious, how are you doing the iter# -> wavelength mapping? it needs to be periodic, so something like sin(iter * freq) re-scaled to be in [400, 700] perhaps.


Title: Re: Buddhabrot Gold and Sky
Post by: ker2x on December 04, 2010, 05:05:14 PM
very nice image ker2x!

i'm curious, how are you doing the iter# -> wavelength mapping? it needs to be periodic, so something like sin(iter * freq) re-scaled to be in [400, 700] perhaps.

i'm not doing that kind of mapping.
my mapping is really simple :

Code:
            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++; }
            }

and later (on the cpu) :
Code:
            for (int i = 0; i < (buddhaCloo.width) * (buddhaCloo.height); i++)
            {
                if (buddhaCloo.h_outputBuffer[i].R > maxfoundR) { maxfoundR = (int)buddhaCloo.h_outputBuffer[i].R; }
                if (buddhaCloo.h_outputBuffer[i].G > maxfoundG) { maxfoundG = (int)buddhaCloo.h_outputBuffer[i].G; }
                if (buddhaCloo.h_outputBuffer[i].B > maxfoundB) { maxfoundB = (int)buddhaCloo.h_outputBuffer[i].B; }
            }

            if (maxfoundR > maxfound) maxfound = maxfoundR;
            if (maxfoundG > maxfound) maxfound = maxfoundG;
            if (maxfoundB > maxfound) maxfound = maxfoundB;

            double maxSqrtR = Math.Sqrt(maxfoundR);
            double maxSqrtG = Math.Sqrt(maxfoundG);
            double maxSqrtB = Math.Sqrt(maxfoundB);

            LockedBackBuffer = backBuffer.LockBits(backRect, ImageLockMode.WriteOnly, PixelFormat.Format32bppRgb);

            for (int i = 0; i < (buddhaCloo.width) * (buddhaCloo.height); i++)
            {
                colorR = (int)( (Math.Sqrt(buddhaCloo.h_outputBuffer[i].R)) / maxSqrtR * 255.0);
                colorG = (int)( (Math.Sqrt(buddhaCloo.h_outputBuffer[i].G)) / maxSqrtG * 255.0);
                colorB = (int)( (Math.Sqrt(buddhaCloo.h_outputBuffer[i].B)) / maxSqrtB * 255.0);
                buffer[i] = (((colorR & 0xFF) << 16) | ((colorG & 0xFF) << 8) | (colorB & 0xFF));
            }