## Vines #1 Two days ago I promised to shift gears. So here is a new series called vines. The title may not obvious with today’s image. More on that later.

Today’s image is the same area as the previous two, Smooth 1D Color #18 and Smooth 1D Colors #17. It is also a continuation of the accumulator colors method. However, now the parameters are set in such a way to create shapes in the background, rather than just smoothing out the color bands. The colors are still continuous, we are not going to bring back the banding in the early fractals. The goal now is to put interesting things in the background.

The previous images were generated by overlaying many fuzzy disks. This one is generated by overlaying many fuzzy circles. By strict definition, if not by common usage, disks and circles are not the same thing. A circle is the edge or border and a disk is the inside of that round thing you are thinking about.

Some gentle mathematics follow, I promise it is gentle, please give it a chance even if you do not consider yourself a “math person”. It is very easy.

I introduced the math for accumulator colors in Smooth 1D Colors #10. The simple formula $1 - |z|/r$ played a key role. Actually many of the pictures use $1 - |z-a|/r$. Which is the same thing when a = 0.

Today’s image uses $1 - ||z-a|-r_1|/r_2$

First a recap on the old formula. a and r are arbitrary parameters. a is complex and r is real. (A complex number is a pair of real numbers.) Different values of a and r produce different colorings, and a lot of opportunities to experiment.

z has many values, in an academic paper it would be called $z_i$. z tracks a point’s orbit in the fractal calculation. The mathematician’s definition of orbit is different from the astronomer’s. For now, just think of it as a big bucket of numbers that you get from the fractal calculation. $1 - |z-a|/r$ is a disk centered at a with radius r.

People with some mathematical sophistication will object, for you folks, the set of z’s for which this function is positive is a disk centered at a with radius r.

Let’s say C = the circle centered at a with radius r. This is just to make my typing and your reading a bit easier. The aforementioned disk is the interior of C.

Let’s break it down the formula.

If z = a then $1 - |z-a|/r = 1$

If z is inside C, then |z-a| < r and $0 < 1 - |z-a|/r <= 1$

If z is on C, then |z-a| = r and $1 - |z-a|/r = 0$

If z is outside C, then |z-a| > r and $1 - |z-a|/r < 0$

I called this a fuzzy disk. Imagine we are painting, and this formula tells us how much paint to use. 1 is full coverage, 0 or less is no coverage, and the numbers in-between indicate partial coverage. 1/2 is a mix of 1/2 the new color and 1/2 the previous color. If we put black paint on a white background with this recipe we get a blurred disk, solid black at the center, and a smooth transitions to white at the edge.

Now, back to our bucket of numbers, the z’s. Apply this formula to each one, and add up all of the positive values. The resulting sum is used to look up a color in a color palette. Paint the screen pixel that color. This is done for every pixel on the screen. (Each pixel gets a different bucket of z numbers, and so a different color.)

Wow, that is just recap. On to today’s picture and $1 - ||z-a|-r_1|/r_2$

If z is distance $r_1$ from a, then $|z-a|-r_1 = 0$, call this circle C. On C the full expression $1 - ||z-a|-r_1|/r_2 = 1$

If z is distance $r_1 + r_2$ from a, then $||z-a|-r_1| = r_2$ and $1 - ||z-a|-r_1|/r_2 = 0$. Call this circle C+.

Also if z is distance $r_1 - r_2$ from a, then $||z-a|-r_1| = r_2$ and $1 - ||z-a|-r_1|/r_2 = 0$. Call this circle C-. If $r_1 < r_2$ then C- does not exist. It would have negative radius. That is not a problem.

Summarizing, we have three circles, all centered at a, with different radii.

If z inside C- or outside C+ then $1 - ||z-a|-r_1|/r_2 < 0$

If z outside C- and inside C+ then $1 - ||z-a|-r_1|/r_2 > 0$

If z is on C then $1 - ||z-a|-r_1|/r_2 = 0$

And that is the fuzzy circle. The formula is one on the circle C and smoothly fades to 0, in both directions, in and out.

This formula has all the important properties for smooth coloring. It is a suitable candidate for accumulator coloring algorithm. Since the “hot spot” is a circle rather than a point, lines (actually arcs of distorted circles) begin to appear in the image.

(2019/06/07 edit note: Substantial revision incorporating suggestions from someone who considers herself not a “math person”.)

This site uses Akismet to reduce spam. Learn how your comment data is processed.