The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Monday, September 06, 2021

Expanding a program from the past

I will start with a disclaimer: this post might be of interest to only two other people, neither of which read my blog (as far as I know). But it's my blog, and I don't care. I find it interesting. Anyway, on with the post.

I was playing around with an old program that plots a chaotic attractor. I won't pretent to know what the chaotic attractor is supposed to represent, but I find it fun to poke around the program from time to time. It revolves around two equations that interact with each other:

xi+1 = (Ayi + B) xi (1 - xi)
yi+1 = (Cxi + D) yi (1 - yi)

with the resulting image x and y values plotted on the graph between 0,0 and 1,1:

[Graph of output where A=2.4376, B=1.5624, C=0.8659 and D=4.0] Yup, still looks like an alien French horn.

But then I got wondering—why the unit square? Thirty years ago I never questioned that. It should be easy enough to find out—just change the output range a bit:

[Same output as before, except ¼ the size due to the extended range] And I can just hear Grover, way off in the distance, yelling “Far!”

Cool! I now have the range from -1,-1 to 1,1 working. So whereas before, I would have seen:

[For those curious, this is A=-0.4369, B=-1.6109, C=-3.1058 and D=-1.5358] Crashing waves?  Overlapping mountains?  Just a bunch of white dots in a black background?

I can now see the full extent of this particular result:

[Same as above, only from -1,-1 to 1,1] Perhaps a transdimensional tri-cornered hat?  I don't know, it's a Rorshach test on acid!

And otherwise dull plots in the 0,0 to 1,1 range are now full of detail:

[I don't have correct values for this plot—it's too chatoc to reproduce.] When I came across this image, I recorded the values of A, B, C and D. But at the time, I was running with the output and control windows as large as they could get, but the values I recorded were only to four decimal places. Upon trying to revisit this shape, it wasn't what I originally saw. That means I didn't record the values correctly, or more likely, due to the chaotic nature of these things, the results are so dependent upon upon the actual values that four decimal places aren't enough. It was such a result in the 60s from scientist Edward Lorenz that lead to the creation of Chaos Theory.

I am now left to wonder if this would have affected the research this program supported?

Obligatory Picture

[“I am NOT a number, I am … a Q-CODE!”]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site:, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.