Rereading Gleick’s “Chaos” and decided to have a look myself at what it looks like.
Redoing this post – and adding 3 more images, with updated program code.
Here is a series of pictures I produced from the simple equation:
xp[next] = r.xp.(1 – xp)
To produce these images I simply ran the equation for each point on the x axis for a set of ranges of values of r (initially between 1 and 4). Starting the population at .1, I ran it for 600 cycles to reach stability if possible, then continued to run it, recording adding one to each y axis pixel corresponding to a result, recording until one pixel reached 3,200 hits. Then I ran a process over it to change those numbers into a visual rainbow – with red being the lowest numbers to violet being the highest (roy g biv). This makes it easy to see the curves of probability distribution of results in the chaotic zone between 3.6 and 4.
A link to the code I wrote is included below the images.
The first image shows the big picture, as r increases from 1 to 4 the population increases until r gets to 3, when suddenly instead of settling to a single value, it starts to alternate between two values, then at around 3.4 it changes behaviour again, now alternating between 4 values, then at about 3.55 it starts alternating between 8 values, and by around 3.66, it becomes completely chaotic, not settling into any particular repeating pattern, but over many cycles displaying interesting probability distributions.
The next image (Key) just shows what I have done with the two images that follow it.
The image following is the box A stretched to the left, to show more detail.
The final image is the tiny area shown in Box B – r values between 3.565 and 3.585 and y values between 0.8775 and 0.895. This massively enlarged section shows the same fractal pattern almost (but not quite) repeating, at ever finer scales.
Python 2.7 code is on my fishnet site – Teds_Chaos_image44.py