This project explores the dynamics of the Logistic Map
These scripts can visualize orbits, map out bifurcation diagrams, and numerically calculate the Feigenbaum Constant (
- Track the discrete-time evolution of states (
$x_n$ ) for specific control parameters. - Automated detection of period-1, 2, 4, 8, and 16 orbits.
- High-resolution generation of the bifurcation diagram to visualize the period-doubling route to chaos.
- Root-finding to calculate bifurcation points and verify their convergence to the Feigenbaum constant.
The recursive logistic map equation:
Where:
-
$x_n$ is a value between 0 and 1 representing the state at time$n$ . -
$a$ is the control parameter (usually between 0 and 4).
As
Plots the trajectory of
Does two things
- Analyzes the long-term "steady state" of the system after discarding transients.
- Generates a bifurcation diagram by sweeping
$a$ from 2.5 to 4.0.
Uses scipy.optimize to find the exact values of
- Calculates the ratio of the distances between successive bifurcation points to approximate the Feigenbaum constant
$\delta \approx 4.6692$ .
You will need Python 3.x and the following libraries:
Bash
pip install numpy matplotlib scipy
To see a single orbit with a control parameter of 3.8:
Bash
python "first orbit visualizer.py" --a 3.8 --n-iter 100
To run the full Feigenbaum convergence analysis:
Bash
python "feigenbaum analysis.py"
The analysis confirms the universal nature of the Feigenbaum constant. Even with the simple quadratic form of the logistic map, the ratio of distances between bifurcations converges rapidly:
| n | Bifurcation Point (an) | Ratio (δn) |
|---|---|---|
| 1 | 3.000000 | — |
| 2 | 3.449490 | — |
| 3 | 3.544090 | 4.7514... |
| 4 | 3.564407 | 4.6562... |