I had been following the MOOC “Scientific Computing with Fortran” for a week and currently doing the exercises. This is one of the assignments which has piqued my interests - Logistic map. Here’s a neat animation from Wikimedia for the same.
As Wikipedia states it, “The logistic map is a polynomial mapping (equivalently, recurrence relation) of degree 2, often cited as an archetypal example of how complex, chaotic behaviour can arise from very simple non-linear dynamical equations”. It is given by the equation, where,
- (just to keep the final values bound to )
I have written the following Fortran code (along with a simple GnuPlot script) to generate the plot.
|
|
And the following is store in the logisticmap2.plt file.
|
|
I have generated the plot for various initial r values,which pertains to different zoom levels.
I like how such chaotic behaviour rises out of seemingly simple equation and that too in just 3 iterations! Just to put in perspective, this is how the initial conditions looked like.
:)