Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: Adam Majewski on November 19, 2014, 05:50:45 PM




Title: dense image
Post by: Adam Majewski on November 19, 2014, 05:50:45 PM
Hi,
 

What  is the best method for drawing/colouring  images of such part of plane where many points are boundary points ? Example dense images :

https://commons.wikimedia.org/wiki/File:Mandelbrot_Islands_of_Consciousness.jpg

parameter plane of mandelbrot set with
CxMin =  -1.747370789;   
  CxMax =  -1.747370189  ;
  CyMin = 0.004733264;
  CyMax = 0.004733864;

I use DEM mathod but result is not good.

TIA

Adam




Title: Re: dense image
Post by: youhn on November 19, 2014, 07:44:39 PM
Mostly depends on the results you are trying to get. Do you have something in mind? I don't use the DE methods (very much), but I know they have to be tuned to a certain zoom level (or detail level). Normal escape time coloring (iteration bands) could also work. Do you want to copy the looks of this example? Do you want focus on specific parts of the fractal?

I'll create some examples maybe this evening.

Additional hints in the description of the image:

Quote
David R. Ingham made this calculation with MandelZot (free-ware) and processed it with Adobe PhotoShop. The coordinates are his own selection, near the nose.

center (-1.747370489, 0.004733564), magnification 4.42685e+06, maximum dwell 32765. calculation width x height 6400 x 4800. 200th root scaling to make dwell bands large enough at high dwells. Not to miss isolated points, no accelerator was used in the main calculation.

Selections from near the nose (negative real) side characteristically have long hairy filaments extending from denser regions. To make these show clearly, the edge of the border from a separate calculation with distance estimator, disc cutting accelerator and low maximum dwell was overlaid on the high dwell calculation.

Processed with blur more of low dwells only, to enhance fine details, Gaussian blur to anti alias, bi-cubic interpolation (standard) down-size and sharpen.

Seems that David rendered two pictures and merged these together with photoshop.


Title: Re: dense image
Post by: youhn on November 19, 2014, 08:41:35 PM
Following images all created with Kalles Fraktaler with the default coloring method. Only the color palette (density, or "Divide iteration" in KF) has been changed.

(http://i.imgur.com/RwTdQnb.jpg)

+

(http://i.imgur.com/EDoL5u3.jpg)

=

(http://i.imgur.com/CHdcipF.jpg)

And another, with waves of HUE and SATURATION added to the palette for some color:

(http://i.imgur.com/zBVt2Zv.jpg)

This last image is just 1 rendered image from KF. The software allows to create very long color palettes using waves of a combination of (Brightness, Hue, Saturation). The length of the waves can be adjusted and multiple waves can be added together. So I used longer wave periods for the big shapes (the spirals) and much shorter periods to make the filaments visible.

Those wave can be used to put focus on the repeating elements in fractals. See for example http://jeroensnake.deviantart.com/art/The-art-of-deforming-steel-448176415 where the black parts of the waves are lined up to create some kind of rectangle.


Title: Re: dense image
Post by: Adam Majewski on November 19, 2014, 09:39:35 PM
Mostly depends on the results you are trying to get. ... Do you want focus on specific parts of the fractal?

Yes, boundary


Title: Re: dense image
Post by: youhn on November 19, 2014, 11:02:02 PM
What do you exactly mean by that?

You might want to read the story on this link: http://www.juliasets.dk/FractalsAndArt.htm


Title: Re: dense image
Post by: youhn on November 20, 2014, 08:09:05 PM
Ok, sorry ... that was a bit mean question. Nobody can exactly point the boundary of the Mandelbrot set. We know how to approach it, we can fairly exactly calculate the area that it holds. But as far we can tell, the circumference distance is infinite. The Mandelbrot can do that, because it curls the boundary without ever intersecting itself. But we never see the boundary itself, only the iteration bands that approach it. Or the color given by the Distance Estimation calculation. But in all cases it's only an approximation. This means all coloring methods based on iteration calculation heavily depend on these (finite and discrete) iterations. So actually we are not coloring the (ultimate, infinite) fractal, but the approximation process. This needs tuning:

1
(http://i.imgur.com/4Y6GjDe.png)

2
(http://i.imgur.com/8v36OzW.png)

3
(http://i.imgur.com/L3kNRN6.png)

4
(http://i.imgur.com/yTxo0jq.png)

5
(http://i.imgur.com/umw3dPk.png)

6
(http://i.imgur.com/8Zqpp1c.png)

These pictures are made with Gnofract4D using the DE coloring method. While normally the value for "Color Density" is around 1, the first images starts with a value of 800! For each picture, the color density is 1600, 3200, 5100, 7800 and finaly 12000. In order to get nice smooth bands, the value for Bailout was set to 256 (instead of the default value 4). The color palette that was used is visible when zooming out:

(http://i.imgur.com/exv9WPd.png)

For this zoomed out picture a Color Density value of only 2 has been used (but with high bailout of 256).


Title: Re: dense image
Post by: Adam Majewski on November 21, 2014, 05:28:59 PM
Yes this is my problem. The first image from top ( zoomed) is what I call dense - hard to see a detailed structure of boundary. I see you have changed bailout and density, but the result is IMHO not the best. How to improve it ?


Title: Re: dense image
Post by: claude on November 22, 2014, 05:49:18 PM
DEM is the best way to visualize the boundary.  If the image is too dense for aesthetic taste, super-sampling can show more details.  Plain super-sampling could be done by rendering larger and downscaling.  I wrote a quick blog post on adaptive super-sampling which can be faster:

http://mathr.co.uk/blog/2014-11-22_adaptive_supersampling_using_distance_estimate.html

Here's your dense view at depth 4 (equivalent to 16x16 super-sampling):

(http://mathr.co.uk/blog/g/2014-11-22_adaptive_supersampling_using_distance_estimate/dense-4.png)


Title: Re: dense image
Post by: Adam Majewski on November 23, 2014, 07:52:34 AM
Hi.

Thx for the answers.

So supersampling makes image better.

I have also asked general question on Mathoverflow (http://mathoverflow.net/questions/187842/is-ther-a-dense-subset-of-parameter-plane-which-is-not-an-interior)



Another possible aprooaches :
- thinning boundary to a skeleton ( mathemathical morphology (https://en.wikipedia.org/wiki/Mathematical_morphology), skeletonisation ) I have tried with image magic (http://www.imagemagick.org/Usage/morphology/#thinning), but my results were not good
- searching from exterior ( like along external rays ) into black regions to show structure of dense regions
- counting how many percentage of pixel is coverd by parts of Mandelbrot set and use colour proportional to the percentage

Are these ideas good ?



Title: Re: dense image
Post by: claude on November 23, 2014, 05:17:27 PM
- counting how many percentage of pixel is coverd by parts of Mandelbrot set and use colour proportional to the percentage

This is essentially what super-sampling does.


Title: Re: dense image
Post by: claude on November 23, 2014, 05:25:39 PM
These pictures are made with Gnofract4D using the DE coloring method. While normally the value for "Color Density" is around 1, the first images starts with a value of 800!

I think Gnofract4D has a bug with its DE method, see glitch circled in attached image.  Possibly due to calculating derivative after z<-z^2+c instead of before it at each iteration.

Also it should automatically scale "Color Density" relative to pixel size for best appearance, to avoid having to change it manually.


Title: Re: dense image
Post by: Adam Majewski on November 23, 2014, 09:05:16 PM
This is essentially what super-sampling does.


Yes, usually. But one can also use other method , like : if even only one subpixel is black, then colour whole pixel also black ( not light gray like in average method )


Title: Re: dense image
Post by: youhn on November 23, 2014, 11:19:56 PM
The super-sampling makes this discussion more complex. When you use the "if even only one subpixel is black, then colour whole pixel also black"-method on dense locations, the resulting image will only reveal shapes if you use enough pixels. From a distance the image will look grey. Rendering dense locations will results in darker grey images.

A little sidenote on this discussion. When using iteration band coloring methods (most default/classic without smoothing) you can zoom into the antenna in order to use the filaments to simulate the smoothing. The trick is to zoom past a few minibrots at some distance (about 2-8 times the size of the minibrots) so you get enough bifurcations to make a dense area of filaments around the chosen mini. Then start zooming into that minibrot hunting for your wanted location:

1. Go for antenna and focus on the filaments (keep zooming between the minis)
(http://i.imgur.com/Mek2uQp.jpg)

2. After enough zooming past a few minis, choose a mini. Adjust the color density to make it look like the original.
(http://i.imgur.com/8uxhBYx.jpg)

3. Zoom into one of your favorite locations and notice how the quickly get too small for the eye to see (moving towards the center)
(http://i.imgur.com/zClgorN.jpg)

4. Due to this shape stacking and the bifurcation property of the mset, the density around the mini only increased when getting near to the apparent boundary
(http://i.imgur.com/iSgCo3u.jpg)

p.s. dense locations are hard to calculate. SeryZone really likes these challanges. Maybe some of his zoom videos on youtube can provide some insight. For example https://www.youtube.com/watch?v=SBE72GNEmv8


Title: Re: dense image
Post by: youhn on November 25, 2014, 03:22:16 PM
As in life we say things like "It's not about the destination, but the journey",
so for fractals it's not always about the zoomed end results, but the zooming journey that took place before it.

Made a video of the simulated smooth coloring that makes use of the antenna filaments:

https://www.youtube.com/watch?v=l-T7m_S5vBA


Title: Re: dense image
Post by: Adam Majewski on November 25, 2014, 03:27:26 PM
Looks good. I was thinking also about constant zoom and increasing  iteration max to show filaments.


Title: Re: dense image
Post by: youhn on November 25, 2014, 03:42:46 PM
Oh, and thanks for sharing the link to mathoverflow. The second answers is indeed very good. Did not know there was a name for it ... The hairiness theorem (source: http://mathoverflow.net/questions/187842/is-there-an-almost-dense-set-of-quadratic-polynomials-which-is-not-in-the-inte )


Title: Re: dense image
Post by: Adam Majewski on September 08, 2017, 07:53:35 PM
https://www.math.univ-toulouse.fr/~cheritat/wiki-draw/index.php/Mandelbrot_set
see downsacling with gamma correction


Title: Re: dense image
Post by: claude on September 12, 2017, 04:14:56 PM
Nice link, some formulas there are new to me (Henriksen's boundary detection method, distance estimator normal map).

Typically images are in non-linear sRGB colour space.  To downscale correctly, you need to do that in linear colour space:

input sRGB image -> convert to linear RGB image -> downscale (= low pass filter -> decimate) -> convert back to sRGB image -> output sRGB image

the formulas for sRGB conversion are on wikipedia:  https://en.wikipedia.org/wiki/SRGB#Specification_of_the_transformation


Title: Re: dense image
Post by: Tglad on September 13, 2017, 03:40:29 AM
There was a discussion on this a few years back: http://www.fractalforums.com/sterlingware/to-anti-alias-or-not-to-anti-alias-hit-the-button-or-leave-it-alone/ (http://www.fractalforums.com/sterlingware/to-anti-alias-or-not-to-anti-alias-hit-the-button-or-leave-it-alone/)

A nice answer is to use the local fractal dimension of the set to control the antialiasing. The local fractal dimension doesn't mean 2 for the Mandelbrot set, it is what the set looks like at a particular point and zoom depth... so is local in position and scale.

In the pic below the left image shows how supersampling makes tendrils fade out, the right image shows that if you give every point in the set a half-pixel width, then the result is too thick. The middle image shows the new local-fractal-dimension based method.

I published a paper on this: http://ieeexplore.ieee.org/document/7138673/ (http://ieeexplore.ieee.org/document/7138673/) (paywalled unfortunately), and a short blog post: http://tglad.blogspot.com.au/2012/12/dimension-aware-rasterising.html (http://tglad.blogspot.com.au/2012/12/dimension-aware-rasterising.html)