Chaos Fish

Did a little bit of Chaos Theory back in the 90's when it was trendy, using C with borland IDE. I seem to remember it putting PC at the time under pressure (p90,16mb of ram). Wanted to see if I could do it again with a browser.

I think that it was biologists that happend upon this brand of Maths. They noted that when the rate of population growth went beyond 3 the predictions on future populations became increasingly chaotic.

The equation is a model for population growth in a fish pond is pretty trivial and looks like this:

x_next = r*x*(1-x)
Meaning that the population for the next iteration (year, month, day, whatever) equals x_next, the rate of population growth r, multiplied by the current population x, multiplied by a term that keeps the population within bounds (e.g. as the population increases, food becomes increasingly scarce and some of our fish die). (1-x).

The parameter manipulated is the rate of growth r, The fish population oscillates in regular patterns over multiple iterations and eventually becomes chaotic, i.e., no regular pattern is readily apparent. Manipulated the r value between 2.75 and 4 to see some progression of Chaos

Try 4