• July 24, 2021, 04:46:59 PM

Login with username, password and session length

Author Topic: (Question) Is this what a histogram coloring of the Mandelbrot set should look like?  (Read 1477 times)

0 Members and 1 Guest are viewing this topic.

Offline claude

  • Uploader
  • *
  • Posts: 1937
    • mathr.co.uk
(Question) Re: Is this what a histogram coloring of the Mandelbrot set should look like?
« Reply #15 on: July 02, 2019, 09:34:06 AM »
Oh! Ok, I see what you did.  That should be much fast but quality may suffer if the bin spacing isn't fine enough.  It's also heavily dependent on the minimum and maximum iteration counts achieved in the image because the bins are equally spaced.

More detail on my method:
O(W * H * N) for calculating the iteration counts, where N is the average iteration count per pixels.
O(B * log(B)) for sorting the histogram with B  = W * H unevenly spaced bins (one bin per pixel).
O(W * H * log(B)) for looking up the histogram per pixel.

Maybe it's possible to do a hybrid, subsampling the image to reduce B to more sensible levels (because 10-bit accuracy in the final image is perfectly fine for most purposes). Would need a custom `bsearch()` that returns a neighbour of the element's position if the element is not found (instead of NULL which is absolutely useless).

Offline Duncan C

  • Fractal Friend
  • **
  • Posts: 14
I think the problem you may be facing is where you place the transition from the black-to-blue color gradient and the blue-to-white gradient. I implemented histogram-based colors in my app, Fractalworks.

When I manually set that transition at 17 iterations in FractalWorks to plot using histogram-based color gradients and integer iteration values I get a plot that I think looks better than your linear color table plot:

FractalWorks also lets you use histogram information to decide where to place color transitions. When I switch to histogram-calculated transitions and make the transition from the black-to-blue gradient to the blue-to-white gradient at the point where 95% of pixels are plotted with the black-to-blue gradient, the result looks nearly identical, but now the colors assignments are adaptive (which is a major benefit of histogram-based color schemes.)
« Last Edit: August 24, 2019, 01:28:09 AM by Duncan C »

Offline Duncan C

  • Fractal Friend
  • **
  • Posts: 14
With histogram-based colors a simple one-gradient color scheme produces nice looking colors and decent definition of the shapes for pretty much any plot.

Here is a plot of Map 48 from the Beauty of Fractals using a simple blue-to-white histogram based gradient:

"Time Span"

Started by cricke49 on Fractal Image Gallery

0 Replies
Last post August 02, 2018, 07:05:21 AM
by cricke49
Smooth histogram coloring failure

Started by Smolt on Programming

3 Replies
Last post August 23, 2019, 03:47:41 AM
by Duncan C
Neural Style Transfer enhanced Mandelbrot zoom

Started by schizo on Fractal movie gallery

6 Replies
Last post December 22, 2020, 09:31:14 PM
by schizo
A new style of fractal imagery using fractal neural style transfer

Started by iRyanBell on Fractal Image Gallery

4 Replies
Last post July 18, 2021, 03:47:45 AM
by Chris_M_Thomasson
Entropy mandelbrot coloring

Started by gerrit on Fractal Mathematics And New Theories

43 Replies
Last post April 03, 2021, 06:26:07 PM
by claude