“Everybody should learn to program a computer, because it teaches you how to think.” — Steve Jobs I’ve shown many attractor images I have generated over the past few weeks, but how have I been drawing them? I have been writing code to do so, but stopped including it in the posts because it was getting long and complex. I promised that, someday, I would share the code. Today is that day!
Ash nazg durbatulûk, ash nazg gimbatul, ash nazg thrakatulûk agh burzum-ishi krimpatul. One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them. — J. R. R. Tolkien’s The Lord of the Rings (1954–55) I’ve been going on and on about de Jong attractors lately , but that is only one kind of attractor. There are many others! This image is a Svensson attractor. It uses a set of equations very similar to what the de Jong attractor uses, and also requires four constants which define the shape of the result. Because of the way it handles sine and cosine, circular results are far more common than with the de Jong equations.
In my last post , I talked about coloring a de Jong attractor based on the number of times each point in the image was generated by the de Jong equations. Of course, there are other ways to do it! Since we have more than one way, we’d better name them so we don’t get confused. We’ll call the first method Frequency Coloring since it’s based on how frequently each point appears. Now let’s talk about Velocity Coloring!
In my last post , I took a first stab at coloring a de Jong attractor. Here was my image: The main problem was that I had wanted an image in which the points with the fewest hits were blue, transforming to red for points hit the highest number of times, but as you can see, the image was stubbornly mostly blue, whereas I would have expected a lot of shades of purple as the blue transformed to red.
Hello! By now you have seen Tandika's article explaining why it’s been so long since we have posted anything. It’s been a wild three years! Things are finally getting back to normal (although as she mentioned, a new normal.) This post, as well as the next several “The Artist’s Husband” posts, were written three years ago, when I thought they’d be published. I’ll post these about once a week until I work through the backlog. After that, I plan to continue posting periodically, as often as I can.
Last week , I showed a program I was working on to generate deJong attractor images. I mentioned I’d be working on adding some color. I am not there yet! This is a mere stop to take a breather, and to talk about an intermediate step: smoothing the image. Here is one of my images from last week: While interesting, there are some problems here. I am just calculating points, and as each one is calculated, I draw it on the canvas, even if it has already been drawn. For any given set of input constants, there are going to be the same points showing up a lot, some more than others. The final image, however, is very sensitive to the number of unique points I actually draw. Too few, and there is not much to see. Too many, and the image devolves into an amorphous blob:
In my last post , we played The Chaos Game and ended up with a Sierpinski Triangle. It’s quite nice as far as it goes, but there is not a lot of variation and visual interest beyond the initial surpise of finding it buried in the chaos at all. This time around, lets look at the de Jong attractor. First, some terminology! An Attractor is a dynamic system with a set of numeric values to which the system tends to evolve over time, no matter what state it starts in. An attractor is called a Strange Attractor if it contains a fractal element. The Sierpinski Triangle we came up with last week is an example of a strange attractor. It doesn’t matter what your starting point is (it could be miles away from the triangle), you will eventually get pretty much the same result for any given triangle. The de Jong attractor is another example of a strange attractor.