drakaan Posted September 18, 2007 Share Posted September 18, 2007 Can you please make this plugin faster? Its a great plugin, and I use it a lot, but its just really, really slow. It's bound to be a bit slow...it has to run a particular floating-point calculation for each rendered pixel...barring some unknown (and faster) optimization for calculating the value of a point in mandelbrot space, you can probably only go faster with a faster computer. Quote Link to comment Share on other sites More sharing options...
moc426 Posted September 18, 2007 Author Share Posted September 18, 2007 Yah I am not sure if I can improve its performance yet, I haven't looked at that, but it does do a lot of iterations so its bound to be slow. When I have time I will take a look at that. As for the pan, I can probably setup a pan box like zoom blur deluxe but I don't know about actually rendering a small image of it. But again when time allows. Can you please make this plugin faster? Its a great plugin, and I use it a lot, but its just really, really slow. It's bound to be a bit slow...it has to run a particular floating-point calculation for each rendered pixel...barring some unknown (and faster) optimization for calculating the value of a point in mandelbrot space, you can probably only go faster with a faster computer. Quote Link to comment Share on other sites More sharing options...
Andrew D Posted September 18, 2007 Share Posted September 18, 2007 Yeah, for some reason the script in codelab dosen't take a while, but then again it hasn't got loads of options for everything. Quote Link to comment Share on other sites More sharing options...
Myrddin Posted September 18, 2007 Share Posted September 18, 2007 Thus far all has been dandy regarding speed, even when zooming, and I don't consider my system particularly fast. Looking forward to the updates you have planned, moc426. Quote How to Save Your Images under Different File Types My dA Gallery Link to comment Share on other sites More sharing options...
Fisherman's Friend Posted September 23, 2007 Share Posted September 23, 2007 NOTE: I did not write the mandelbrot function, the function is taken directly from the codelab sample. The function was converted from codelab to c#. Would like to do same for julia function sometime and perhaps follow up with other types. Julia function is a sample in codelab as well so that shouldn't be a problem to setup. Can you do the same with warp.cs? Quote Link to comment Share on other sites More sharing options...
Paint Boy Posted September 23, 2007 Share Posted September 23, 2007 Some of the sliders and options kind of confuse me, but what it does is beautiful. I love this plugin, it's awesome. This is really awesome! Just look what you can do with it: http://www.freewebs.com/isafari-theme/Background1.png Quote Link to comment Share on other sites More sharing options...
jsonchiu Posted November 4, 2007 Share Posted November 4, 2007 Completely unrelated to the sample script in codelab, I wrote this code myself. It continuously color the image through as a gradient and it supports zooming up to 10^16. The accuracy of the xpan/ypan is to 10^-14 Paste the code into code lab, and experience with the 4 values. If you keep the values unchanged, and keep adding 0's to the Amount3, you will see a zooming sequence similar to the one in Wikipedia (and it goes to the maximum accuracy - about 10^16) which lands on an island. I couldn't do any anti-alias to the image, so it might look a bit too sharp. Example (I made a large image, resize it, and sharpen a little bit): long Amount1=74657146173202; //[-100000000000000, 100000000000000]Xpan long Amount2=10498959565562; //[-100000000000000, 100000000000000]Ypan long Amount3=256; //[50, 10000000000000000]Zoom int max = 16384; //[0, 131702]Maximum iteration (Accuracy) double mod = 256; //value doesn't matter, as long as the variable "mod" is declared void Render(Surface dst, Surface src, Rectangle rect) { PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); // Delete any of these lines you don't need Rectangle selection = this.EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt(); long CenterX = (long)(((selection.Right - selection.Left) / 2)+selection.Left); long CenterY = (long)(((selection.Bottom - selection.Top) / 2)+selection.Top); ColorBgra PrimaryColor = (ColorBgra)EnvironmentParameters.PrimaryColor; ColorBgra SecondaryColor = (ColorBgra)EnvironmentParameters.SecondaryColor; int BrushWidth = (int)EnvironmentParameters.BrushWidth; ColorBgra CurrentPixel; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { if (selectionRegion.IsVisible(x, y)) { CurrentPixel = src[x,y]; ColorBgra prevPix1; ColorBgra prevPix2; ColorBgra prevPix3; if (x > 1 && y > 1) { prevPix1 = dst[x-1,y]; prevPix2 = dst[x-1,y-1]; prevPix3 = dst[x, y-1]; } else { prevPix1 = prevPix2 = prevPix3 = dst[x,y]; } double r = (double)(x - CenterX) / Amount3 + ((double)Amount1 / 100000000000000) * (-1); double i = (double)(y - CenterY) / Amount3 + ((double)Amount2 / 100000000000000) * (-1); double iter = (double)(mandelbrot(r, i)); CurrentPixel.A = 255; CurrentPixel.R = (byte)(getR(iter)); CurrentPixel.G = (byte)(getG(iter)); CurrentPixel.B = (byte)(getB(iter)); dst[x,y] = CurrentPixel; } } } } double modular(double iter) { if (iter < 512) { mod = 256; return iter % 256; } else if (iter < 2048) { mod = 512; return iter % 512; } else if (iter < 8192) { mod = 4096; return iter % 4096; } else if (iter < 32768) { mod = 16384; return iter % 16384; } else { mod = 65536; return iter % 65536; } } int getR(double iter) { if (iter >= max) { return 0; } iter = modular(iter); if (iter < mod / 4) { return 0; } else if (iter < mod / 2) { double prev = mod / 4; double newIter = iter - prev; int col = (int)(newIter * (255 / mod * 4)); if (col >= 255) { return 255; } else { return col; } } else if (iter < mod / 8 * 5) { return 255; } else if (iter < mod) { return (int)(-1 - (iter - mod / 8 * 5) * (255 / mod * (1 / ((double)3 / 8)))); } return 0; } int getG(double iter) { if (iter >= max) { return 0; } iter = modular(iter); if (iter < mod / 8) { return 0; } else if (iter < mod / 8 * 3) { return (int)((iter - mod / 8) * (255 / mod * 4)); } else if (iter < mod / 16 * 9) { return 255; } else if (iter < mod / 8 * 6) { return (int)(-1 - (iter - mod / 16 * 9) / 2 * (255 / mod * 8)); } else if (iter < mod / 16 * 15) { return (int)(-1 - (iter - mod / 16 * 15) * (255 / mod * (1 / ((double)12 / 16)))); } return 0; } int getB(double iter) { if (iter >= max) { return 0; } iter = modular(iter); if (iter < mod / 4) { return (int)((iter + 100) * (255 / (mod / 4 + 100))); } else if (iter < mod / 2) { return 255; } else if (iter < mod / 16 * 9) { return (int)(-1 - (iter - mod / 2) * (255 / mod * 16)); } else { return (int)((iter - mod / 16 * 9) / 2 * (255 / mod * (1 / ((double)7 / 16)))); } return 0; } int mandelbrot(double r, double i) { double X = r; double Y = i; double X2 = X * X; double Y2 = Y * Y; int counter = 0; while ((X2 + Y2 < 4) && (counter <= max)) { Y = 2 * X * Y + i; X = X2 - Y2 + r; X2 = X * X; Y2 = Y * Y; counter++; } return counter; } Quote Some links: | Personal Website | Alien Attack | Try out my plugins: | Antialias | Diagonal Lines | Link to comment Share on other sites More sharing options...
fishermen_1275 Posted August 1, 2008 Share Posted August 1, 2008 I´ve got a Problem with this one cuz I downloaded the plugin but when I do it I just get the posibility to change the -Factor 1-10 -Zoom 1,00-100,00 -Angle -Quality thats all I can change on the panel. I don´t even have the X and Y Off spring and that´s often with other tool too that I don´t have the same panel as shown in the tuts does anyone know why ? Quote Link to comment Share on other sites More sharing options...
RyuinfinityPDN Posted August 2, 2008 Share Posted August 2, 2008 You don't need this. It is included in PDN now. Quote -- Make an Explosion in Space-- Link to comment Share on other sites More sharing options...
dogma999 Posted September 11, 2009 Share Posted September 11, 2009 moc426, 'Fractal Mandelbrot - Updated 09/15/2007' download link isn't working. is there another place i can go to download it? Quote I believe bliss and terror are based on a person's perspective. Link to comment Share on other sites More sharing options...
someone93 Posted September 11, 2009 Share Posted September 11, 2009 moc426, 'Fractal Mandelbrot - Updated 09/15/2007' download link isn't working. is there another place i can go to download it? It's included in PdN (as stated in the post above yours). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.