Logo by jwm-art - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 19, 2024, 08:13:49 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]   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 Gold and Sky  (Read 897 times)
Description: Buddhabrot on gpu
0 Members and 1 Guest are viewing this topic.
ker2x
Fractal Molossus
**
Posts: 795


WWW
« on: December 04, 2010, 12:59:08 AM »

A work in progress with my rewritten openCL code :

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/
ker2x
Fractal Molossus
**
Posts: 795


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

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/
The Rev
Guest
« Reply #2 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
Logged
lycium
Fractal Supremo
*****
Posts: 1158



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

ker2x
Fractal Molossus
**
Posts: 795


WWW
« Reply #4 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));
            }

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/
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Spaceship One - The Heart of Gold Fractal Fun hermann 0 2672 Last post April 04, 2010, 03:27:56 PM
by hermann
Incan Gold Mandelbulber Gallery thetark 0 1006 Last post June 05, 2010, 08:23:20 PM
by thetark
Green and Gold Images Showcase (Rate My Fractal) The Rev 0 693 Last post November 27, 2010, 07:53:23 AM
by The Rev
Gold city Mandelbulb3D Gallery petrus romanus 0 463 Last post November 28, 2010, 08:26:39 AM
by petrus romanus
Gold Crown Images Showcase (Rate My Fractal) Thalamus 0 551 Last post December 05, 2010, 03:16:47 AM
by Thalamus

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.149 seconds with 24 queries. (Pretty URLs adds 0.007s, 2q)