Smooth 1D Colors #15
Here is the image from Smooth 1D Colors #6 reimagined with accumulator colors. Notice the "shadows" behind the fractal, and that the blue and white are gone from the background and pushed into the fractal fine detail.
Those are not real shadows. No 3D, no light, no shadow. I use the word just to describe the lighter and darker shades in the background. The different shades arise because accumulator colors is not simple escape counting, or log-log smoothing of escape counts. Orbits of nearby points may escape at the same time, but they behave differently along the way. They take different paths on the way out. Accumulator colors uses all the points in the orbit.
Smooth 1D Colors #13
Here is a zoom into a Misiurewicz point using accumulator colors, with linear palette re-scaling. The main fractal has a lot of "sparkles". This is the same situation as with escape count coloring, the rate of color change increases with the higher iteration count.
The accumulator color method can create color shading that more closely follows the fractal shape. With iteration counts or log-log smoothing the background is a single color, or gradually changes from the outside to the inside. See Smooth 1D Colors #6 and Smooth 1D Colors #7 for comparison.
Minor oops, I intended to use the same coordinates to contrast accumulator coloring and log-log coloring. I just realized that I have two different Misiurewicz points. I have this image prepared so I am going with it. I may follow up later with new colors for the images in the earlier posts.
Smooth 1D Colors #12
Here is a small zoom. The accumulator colors method is again provides smooth colors. A variation is used to add some interest to the background, without distracting from the main fractal shapes.
The image center is -1.055+0.261i. It is the period 2/7 bulb off the main 1/2 bulb. After looking at a few pictures like this you soon learn how to read these fraction numbers off the image. Notice that there are seven branches radiating from the center, and that the longest is the second clockwise from the root. If you zoom out to the full view, you see the black area on the bottom is part of the main 1/2 bulb (nose or head).
In the top left corner, notice how one stalk reaches a pinch point the seems to grow again. This is true of all of the branches in the picture. It is almost a degenerate case, but applying the same fraction counting scheme as for the 2/7 branch point, we get 1/2. That tells us that all of these are growing off the main 1/2 bulb.
Smooth 1D Colors #11
Today's image uses the accumulator colors method with a variation in the accumulation function.
The log-log smooth coloring method is designed to be as close to escape count coloring as possible. There is very little room to get creative. The accumulator colors method abandons the idea that the integer portion of the smooth color value should match the escape count. Since something less than one is added to the accumulator at each step, the accumulator value is almost certainly less than the iteration escape count. This is not a big deal. In fact after applying linear or nonlinear re-scaling, even escape count coloring does not coincide with the escape count.
The only requirement for smooth coloring with the accumulator colors method is that the amount added at each step must be zero on the escape boundary. That provides a lot of freedom for variations.
Notice how a halo like effect is generated around the fractal. For the fractal purists out there, there is no mathematical significance to this variation. It is done purely for artistic effect.
Smooth 1D Colors #10
Here is another method to generate smooth colors.
I first learned about the log-log smooth coloring method Continuous_(smooth)_coloring in the mid-1990s on the alt.fractals or was it sci.fractals news group. I was afraid of this method because the log function is slow. Actually, log-log is very efficient. But my fear of taking a performance hit was enough that I continued to use a different method that I call accumulator colors. My method turns out to be slower, but it has other advantages.
I assume you have some basic knowledge about generating fractal images, so I will jump right into the middle
Suppose $ z_0$ is the start point, $ z_i$ is the orbit, and R is the escape radius. Color banding, happens when $ z_i$ gets close to R. The fractal function is continuous, but a small change in the starting point, $ z_0$ can result in $ z_i$ landing on the "other side" of R, and thus getting assigned a different color.
Think of escape counting as adding 1 to an accumulator in the inner loop. The accumulator, acc, is set to 0 at the start of the iteration, and inside the inner loop we have
if( |z| < R ) { acc = acc + 1 }
This should make it obvious how a small change in |z| near R, results in a big change +1 in the result.
Now use this instead:
if( |z| < R ) { acc = acc + 1 - |z| / R }
The added value is between 0 and 1, and it is close to 0 when |z| is close to R. The resulting color is continuous.
The derivative of the function is not continuous. Often the result has a different kind of banding, where the rate of color change varies between bands. If the value is squared then we get a continuous derivative:
if( |z| < R ) { acc = acc + (1 - |z| / R)^2 }
https://fractalforums.org/fractal-mathematics-and-new-theories/28/smooth-1d-coloring/2753 has all the math details.
And https://fractalforums.org/image-threads/25/smooth-1d-coloring/2755 has many example images
This method has a rich set of variations.
Today's image required some parameter twiddling to get a color range similar to the first log-log smooth color image.
Smooth 1D Colors #9
Here is another example of a low zoom fractal using Continuous_(smooth)_coloring. Wikipedia gives this method a name that is too generic. There are other smooth coloring methods. I am going to call this method the log-log color method. (The reason is obvious if you check the link.)
In earlier posts I used linear and nonlinear rescaling to tweak the colors on deep zoom fractals. Now, after applying the smooth color algorithm, palette rescaling can be used to tweak colors on low zoom fractals.
I am not going to demonstrate this continuous color method on a deep zoom fractal. Since this method is carefully crafted to match the escape count, up to a fractional amount there is no appreciable difference in the resulting images between the two methods.
I should also mention that the log-log method only works for degree-2 polynomials like $ z^2+c$. It can be generalized to other polynomials, but often people overlook that. It does not generalize to non-polynomial formulas.
Tomorrow I will present a method that works everywhere.
Smooth 1D Colors #8
Today's image uses a modification of the escape count to produce a continuous value that is used to set the color.
Recall that escape counting produces integer values, which creates color bands in the image.
So far, we have not done anything special for color smoothing. Even with the discrete valued iteration count color method, the color bands naturally disappear in a deep zoom. We re-scale the color palette, using both linear and non-linear methods, to get the optimal amount of color entropy. At some point, the color distance between color steps in the fractal calculation is less than the displayable color steps in the computer graphics hardware.
But re-scaling the palette does not work for no-zoom or low-zoom images. There are simply not enough color values. If scaling used to make each step small, then there is not enough color range, the image appears as a single color.
The first idea is to somehow make the escape count into a real number. If the leading edge of one band is n, and the next is n+1, then fill in the area in-between with real numbers between n and n+1. Once an orbit crosses the escape threshold, try to measure by how much. Then turn that over-shoot into a fraction between 0 and 1 and add it to the escape count. Personally, I tried several things, and I got some to work. My solutions were hacky and ugly. Someone else came up is this elegant answer: Continuous_(smooth)_coloring (Unfortunately the Wikipedia article does not say who developed this method. He or she certainly deserves some praise.)
I am not going to reproduce the math here. Wikipedia does a better job of that. Today's picture shows that this method effectively removes the banding on low-zoom, low escape count, fractal images.
Smooth 1D Colors #7
In the previous post, the color noise was tamed by adjusting the color range. The fireworks in yesterday's image is nice, and easily qualifies as completed art. But that is not the only choice, less fireworks and more emphasis on shape as with today's image is also a worthy goal.
For today's image, the linear color scale knob is not enough. The blue in today's picture, and the sparkly areas of yesterday's have higher iteration counts than the surrounding area. But the distribution of counts is not uniform. The rate of change is higher in the higher count areas.
A linear scale adjustment can change the overall rate of change, but the relative rate of change between the high and low count areas will remain the same.
The different rate of change is desirable for image composition, it directs focus to where it belongs, it helps the foreground pop out from the background. But how much is the right amount? Of course there is no single answer, it depends on moods and tastes. We need another knob to turn.
So for today's image, I use the square root of the scale-adjusted iteration count for the color index. The square root function serves to squeeze together the high count values, and reduce the color variation in that area.
Smooth 1D Colors #6
Now that is much better. The only thing that has changed is the scale on the palette. The colors palette is "slowed" by a factor of 50. In my program, this value is called color entropy. Previous image = 0.16, this one = 0.0032.
Notice that the color bands are gone. The colors are still set by the integer valued escape count. The only change is the change in the palette scale factor.
Discrete color values do not matter in deep zooms.
The observation should be intuitive, we have large numbers for the escape count, then apply a very small scale factor to the palette. So each step if very small. The difference between two adjacent colors is imperceptible.
Suppose color 0 is black and color 1 is white, your monitor can display only 256 shades of gray between these two color. Put into the 0-1 range, your monitor has discrete shades at each 0.0039 step. In today's picture, the fractal calculation is scaling the palette by a factor of 0.0032. Each "fractal step" is finer than the "display step".
This series of post is leading up to different kinds of smooth colors. The conclusion, "do deep zooms" is not the final answer, just the first observation on the journey.
Smooth 1D Colors #5
Obviously, this image is not meant to be visually appealing. It is an example of what goes wrong. Fractal artists see these things quite often, and they are quickly remove from the hard drive and computer memory. Thus propagating the illusion that all fractals are pretty.
So what went wrong, and why? This image is deep zoom into an interesting area of the Mandelbrot set called a Misiurewicz point. The problem is the palette is set to the same scale as in the previous image. You can see the same color steps if you look at the few areas that are not just random colors.
If you have a map, this Misiurewicz point is near -0.2073 + 0.6947i. The horizontal (x) range of the image is +/- .0004.
What is most significant is that the escape count ranges from 75 to 1921, with average value of 500 (and for the statistic nerd, standard deviation of 22.17). These are much larger numbers, distributed over a larger range than in the previous image. So most pixels get assigned a (fapp) random color with no apparent correlation to adjacent pixels.
In the previous image the escape count range was 2 to 481, with average 4, and sd=2.18. Many fewer colors, and smaller variations.
Smooth 1D Colors #4
The sharp contrast in the color bands works best for two complementary colors. Black and white is probably the best choice. Today's example feature a more gradual color change. From white, through some shades of brown and then shades of blue. The interior is set to the traditional black.
Back in the day, when fractals and personal computers were new, most color graphic cards had a 256 color table. Each pixel is assigned a color number from 0 to 255 in memory, which is used to look up a color in the table. 16.8 million total colors were possible, but only 256 could be displayed at any one time. That graphics design worked out well for fractal coloring which is basically paint-by-numbers. The original DOS fractal program, Fractint, had a feature that would rapidly change the color table in the graphics card which created a trippy psychedelic effect on the fractal.
Now (and for the last 20 years) computer monitors are capable of displaying all 16.8 million rgb colors.
The palette used in this picture is actually a mathematical formula that takes a (continuous) real number and directly generates a color in the 16.8 million color space.
Even if you define a palette as a list of discrete colors, then by using interpolation it is possible to generate a smooth transition between any two colors in the list. It makes sense to ask for color number 3.2, which would be a blend of 80% color 3, and 20% color 4.
So palettes are, or can easily be made into continuous functions that convert real numbers to colors. The discrete colors in this picture are due to the discrete nature of integer numbers, the escape count, and not due to any limitation in the color palette.
When palettes are defined as continuous functions, it is possible to scale palettes to speed up or slow down color transitions. For example instead of using color(x), one could use color(a*x) where a is a scale factor. The only difference between today's picture and yesterday's is a color scale factor of 1/3.
And now, a special addendum for those suffering with technical pedantry syndrome. Yes, 16777216 different colors is still a discrete set of colors. And yes if you look really hard you can see the difference between red #A00000 and red #A10000 which differs in red intensity by 1/256 of the full gamut. But for our purposes, our displays show a continuous range of colors.
Smooth 1D Colors #3
Today's image replaces the black and white bands with different colors. Other than the colors, this is the same as yesterday's R=10 image.
You probably would have chosen different colors. Perhaps opposite or adjacent colors from a color wheel. But it is still trying to find an interesting way to arrange colors in concentric, warped circles.
The focus should be the Mandelbrot set in the middle, not the surrounding color bands. OK, a mathematician may be interested in the equipotential line. But for the rest of us, it is a distraction.
The palette used here is actually my favorite palette, I will use it for the rest of the pictures in this series.
Smooth 1D Colors #2
In the previous image, the escape threshold was set as tight as possible (R=2.0). Notice how all of the black and white bands meet at the left most tip of the mandelbrot set. This image has a larger threshold, it uses R=10.0. Now there is always a gap between the bands.
Not that we are any closer to smooth coloring. This is just another example of non-continuous colorings.
(Introspective diversion: A normal blogger would combine these multiple posts into a single article. I am trying to get into the habit of making daily posts. Trying to write a large post a day will result in immediate failure. The article never feels complete, and often never gets posted. Whereas, adding one small increment to the story each day is possible, and feels like success. I can find the motivation to add one more picture to the story each day.)
Smooth 1D Colors #1
Right, the picture does not match the title. In fact it is the opposite of the title.
You likely have seen fractal images that look like the above. Especially in older books or on old websites. I cannot say why the pictures were produced like this. Perhaps the authors liked the strong contrast between colors, or maybe it was a limitation of their software, or they may have been demonstrating a mathematical property. Whatever the reason, many older fractals look like this.
I created the image to provide a starting point for a series of technical posts on Smooth coloring in fractals. There is something artistically intriguing about the hard contrast of black and white. I want to explore that in the future. But today's post is about some technical aspects of creating fractal images.
The next few post will be somewhat technical. They should still be accessible to everyone. But beginner level knowledge of escape time fractals, of which the Mandelbrot set is the most famous, is assumed. The introduction in Mandelbrot set and the section on Escape Time Coloring will provide sufficient background.
The output of the fractal calculation is an integer, the number of iterations before the orbit exceeds a threshold escape value. Ignore the details in that definition, all that really matters is that the result is an integer. You get discrete, non-continuous values. Not continuous values like real numbers.
The coloring algorithm assigns a color to each value, since the input is discrete, the output, the colors are also discrete. In this case even numbers are black and odd numbers are white (or maybe vice-a-versa, I do not remember).
Zoom Set I #5
Here is a magnification of an area of the lower part of the previous post, a little left of center. Coordinates -0.74910617+0.06947989i. The post has a zoom factor of 4.27x10-7. My program defines zoom differently than conventional usage. Perhaps I should call it something else. The number is the distance from the center to the left and right sides of the view port. If zoom is 1, and center is 0, then the horizontal display area ranges from -1 to +1. I find this convention much easier to work with. (And I will not explain it every time I use it.)