i don’t know if i can do that, compared to existing resources. but i will give it one more try
the others three algos are what is called “chaotic maps,” “iterated maps,” “discrete maps,” &c.
which just means:
- take a function (well, family of functions) and an initial value. for example, the logistic function
f(x) = a * x * (1-x).
- the ‘parameter’ is a term in the function that we give a fixed value. for example
a=3.5 above.
- on each update, evaluate the function and store the result as the next input:
pretty simple. saying how this produces chaotic behavior is less simple. first we need to explain what that means. quickly and sloppily:
[edit: first try was too sloppy, sowing misinformation on other threads.]
- in chaos theory we talk about orbits. put simply, an orbit is a group of paths through the system (technically a “partition of the phase space”), where once our state enters that set of paths you will never leave it. an orbit doesn’t need to be periodic. a lot of orbits are boring things like “decay to such-and-such a value and never leave it again” or “blow up to infinity” or “zero.”
- an attractor is when a number widely-spread parameters values (“points in phase space”) converge to the same orbit.
- a “strange attractor” is when multiple attractors are “interwoven” - for a given starting point you can predict that it will go towards one or another, but hard to say which.
generally, chaotic systems are called that when they have dense periodic orbits, meaning any given point in the state space is is *arbitrarily close to some orbit that has a period." these simple recursive maps meet that definition when we restrain the parameter ranges appropriately.
sometimes i help my mom run math+music workshops for students of various ages, in which we usually introduce chaotic maps at some point. we’ve found it most useful for students to draw up their own cobweb plots for different parameter values of a simple iterated function (like the logistic.)
that link is to wikipedia. the article is very short and mostly consists of two animations; conveniently, they illustrate the logistic map. 1) shows the cobweb plot for the logistic map at a given param vale, and 2) shows cobweb plots for different parameter values as they increase from 2.8 to 4 or something. this is a really direct way of visualizing the orbits, easier i think to follow than a bifurcation plot. (but do read the description of how they are constructed, and i recommend trying it yourself as well - the calculations are simple enough to do by hand.)
tangent: bifurcation plots
in the bifurcation plots above, each position on the x axis represents a value for the fixed parameter. the vertical slice above that position shows all the values that the iterated function produces for that param number (after some large number of iterations.)
often, for a given vertical slice, we also vary the starting positions. thus, the vertical slices represent attractors of the system.
the slick thing for me to do here would be to make a video, where the soundtrack is that dumb sinewave arpeggiator posted above, and for each note we draw a new segment of the cobweb plot in the second animation. so perhaps just imagine that and i think it will give a reasonably useful intuition of what is going on.
the cubic map is a minor tweak on the logistic that causes it to oscillate in sign.
(for both of these, the param range is currently [3, 4] and the orbits will always be at least length=2. we could take the param value down to 1 or something if you want the output to include lots of steady states. the downside of doing that is that it will only seem very “chaotic” in the top 10-15% of the parameter range.)
the henon map is a little more complicated because it uses multiple past values to compute each new value. it basically offers a richer and less predictable territory of different orbits as you sweep the param.
i’ve been thinking about other iterated maps, but not really sure they really extend the palette much compared to henon. maybe gingerbreadman. there are probably others if you’re inteterested in specific patterns of growth/decay.
the other general family of chaotic systems that we could / have considered are systems of differential equations (like lorenz, rossler, chua &c.) i didn’t implement these here because:
- they are more expensive to compute. (wheras analog versions are often very simple, which is why i can say “that has 2 big caps, a quad opamp and a diode, it’s probably chua’s circuit.”)
- if you’re gonna bother computing them, you want at least two parameters (one for the simulation speed) and probably more.
re: elementary CA
i should point out that this implementation is kind of weird and tiny because its only 8 states and they are wrapped. if elementary CA is its own op with different creation arguments, it might be good to increase the number of states, and to have the option of fixing the endpoints.
(i happen to like weird, tiny, circular CA like you see on seashells and stuff, but it’s not very canonical.)
(the most interesting behaviors (i should say, most studied from pure math standpoint) come up when the field is infinite. we can’t do that, but we could use one or more uint32s to store state under the hood. and then arbitrarily restrict the range to give different behaviors. hope that makes sense.)