1

A few weeks ago I started doing some Graphical User Interface programming in QT as a part of updating my skills. The first graphical application was a color wave effect explorer which I needed some help finding a sped up sine function.

I revisited an old hobby I had : investigating the Mandelbrot and Julia sets and other related fractals.

In this question I will try to investigate different functions which give color mapping to the iteration count of a fractal.


Own work

my own work is limited to complementary weighted pairs of vectors to build non-linearly scaled gradients between two well defined end-point vectors: $$f(\log(i)) {\bf g}_1 + (1-f(\log(i))){\bf g}_0$$ where $i$ is iteration count. Here is example with ${\bf g}_0=[1,1,0], {\bf g}_1=[0,0,1]$ (complementary pair of yellow and blue).

enter image description here

But it would be interesting to investigate non linear paths in RGB space. Any reference or idea of how to do this would be welcome.

mathreadler
  • 26,534
  • 1
    Consider using HSV instead of RGB, since it's better suited for smooth color transitions. – g.kov May 20 '21 at 08:25
  • 1
    @g.kov HSV has an awkward wraparound issue where H=0 is the same as H=1. YUV has some of the advantages of HSV while being much more amenable to interpolation. In any case, it's best to do colour space conversion and interpolation between colours in linear light, rather than any non-linear space (e.g. sRGB and the YUV variants often used in video encoding). – Claude May 20 '21 at 09:08
  • 1
    This StackOverflow thread has some options for creating nice-looking gradients in RGB space; the gaussian approach I think looks especially pretty. – RavenclawPrefect May 20 '21 at 22:32
  • @RavenclawPrefect yes I agree. A sum of gaussians looks promising. – mathreadler May 21 '21 at 04:38

0 Answers0