Avoiding "noise" at denser areas

  • 9 Replies
  • 169 Views

0 Members and 1 Guest are viewing this topic.

Offline Fraktalist

  • *
  • Administrator
  • *******
  • Strange Attractor
  • Posts: 1148
« on: July 28, 2019, 11:29:08 AM »
Hey!
Maybe this is already implemented in the colour settings somewhere and I just don't know how to use this.
With standard color settings, when you have a location with both high and low iteration density, you will eithere have low color variation in the low iteration area and 'good looking'  variation in the high iteration area. Or good looking variation in the low density area with lots of "noise" in the high iteration area.
I'd love to get a combination of both. Maybe this can be achieved by dynamically changing the divide iteration and raising it the higher the iterations are per pixel.
Is my babbling understandable?

In the example image I like the colors in the low iteration areas. but closer to the fractal border it gets white-ish noisy and this seems to be a common problem.
(edit: only visible in full view. AA helps to reduce the noice obviously. I should have chosen a more obvious location.)

Does this maybe already exist?

Linkback: https://fractalforums.org/kalles-fraktaler/15/avoiding-noise-at-denser-areas/2958/

Offline Dinkydau

  • *
  • Fractal Furball
  • ***
  • Posts: 249
    • DeviantART gallery
« Reply #1 on: July 28, 2019, 01:51:40 PM »
Mandel Machine has a "transfer function" that changes the iterationCount before coloring. Log has the kind of effect you describe. The higher the iterationcount, the smaller the change in color per extra iteration. It looks something like the attached image.

In addition to log, mandel machine also has square root, cube root and log(log(...)), the last of which gives an even stronger effect.

Offline Adam Majewski

  • *
  • Fractal Feline
  • **
  • Posts: 194
« Reply #2 on: July 28, 2019, 02:15:01 PM »
Mandel Machine has a "transfer function" that changes the iterationCount before coloring. Log has the kind of effect you describe.

Can you show this function in the scr code ?

( mm64.cpp ?? )

TIA

Offline Fraktalist

  • *
  • Administrator
  • *******
  • Strange Attractor
  • Posts: 1148
« Reply #3 on: July 28, 2019, 02:41:50 PM »
yeah, this looks great.
no longer using mandel machine, keeps crashing too often.
I hope claude will add this to KF in a future update (if not already hidden in there)

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #4 on: July 28, 2019, 03:29:53 PM »
There is a dropdown box near the bottom left of the colour dialog that lets you switch between linear, sqrt, log, for either iterations or distance estimates. I can post a screenshot later, on tablet now. The manual says "Unnamed dropdown box - Specifies handling of the iteration count values prior to coloring", in recent KF it defaults to log de.

Offline Dinkydau

  • *
  • Fractal Furball
  • ***
  • Posts: 249
    • DeviantART gallery
« Reply #5 on: July 28, 2019, 05:18:58 PM »
Can you show this function in the scr code ?

( mm64.cpp ?? )

TIA
I think the c++ part is only to declare functions that are implemented in assembly language and the rest is in java.

FractalCanvas.java is the most important file. I searched for "color" there and found that the calculation happens at line 1996 and further:

Code: [Select]
    if(itTransferFunction==1) ;
else if(itTransferFunction==2) it = Math.sqrt(it+1);
    else if(itTransferFunction==3) it = Math.cbrt(it+1);
    else if(itTransferFunction==4) it = Math.sqrt(Math.sqrt(it+1));
    else if(itTransferFunction==5) it = Math.log(it+1);
    else if(itTransferFunction==6) it = Math.log(Math.log(it+1)+1);
    else if(itTransferFunction==7) it = Math.atan(it);
else it = -1;

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #6 on: July 28, 2019, 05:28:33 PM »
https://code.mathr.co.uk/kalles-fraktaler-2/blob/kf-2.14.6.1:/fraktal_sft/fraktal_sft.h#l195 are the options available in KF

Code: [Select]
enum ColorMethod
{
        ColorMethod_Standard = 0,
        ColorMethod_SquareRoot = 1,
        ColorMethod_CubicRoot = 2,
        ColorMethod_Logarithm = 3,
        ColorMethod_Stretched = 4,
        ColorMethod_DistanceLinear = 5,
        ColorMethod_DEPlusStandard = 6,
        ColorMethod_DistanceLog = 7,
        ColorMethod_DistanceSqrt = 8
};


Offline Fraktalist

  • *
  • Administrator
  • *******
  • Strange Attractor
  • Posts: 1148
« Reply #8 on: July 29, 2019, 09:30:03 PM »
thanks for that tip claude, I'll look into it. Kind of expected that you already had something like this implemented.  :thumbs:

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #9 on: July 30, 2019, 11:06:57 AM »
I just added the last couple of options, and even then at Karl's suggestion. So credit is not with me!