Generate an image of the bifurcation diagram of the logistic equation
x1 = r * x0 * (1 - x0)
This is about as cheap and dirty as I could get. I use gnuplot to draw the image, I didn't even bother to have the Go image package involved. My program outputs text representations of floating point numbers.
- For values of r from 2.8 to 4.0 (step 0.0002):
- Set x = 0.5
- Run 100 iterations of x = r * x * (1.0 - x)
- Run 100 more iterations of x = r * x * (1.0 - x), this time keeping all (floating point!) values of x
- Print out r and the unique values of x from step 3
Things that could change the diagram:
- Initial value of x
- Step size of r
- Number of "settling" iterations
- Number of iterations done to find unique values of x
My diagram has bulkier bifuration points than the Wikipedia diagrams. I could not make it as graceful as other people got.