A visual and computational model that generates rectangles based on the golden ratio (φ ≈ 1.618) and the Fibonacci sequence, demonstrating how mathematical proportions appear in nature and geometry.
This project shows the ability to translate mathematical concepts into code: starting from a formal definition (φ = (1 + √5) / 2), building the sequence iteratively, and generating a visual output that represents the underlying structure.
It is an exercise in:
- Mathematical modeling from first principles
- Iterative sequence generation
- Data visualization with Python
The golden ratio φ is defined as:
φ = (1 + √5) / 2 ≈ 1.618
The Fibonacci sequence converges toward φ:
| n | F(n) | F(n)/F(n-1) |
|---|---|---|
| 5 | 5 | 1.6667 |
| 8 | 21 | 1.6154 |
| 12 | 144 | 1.6180 |
pip install matplotlib numpy
git clone https://github.com/net421/phi-rectangles.git
cd phi-rectangles
python "phi rectangles.py"| Area | Detail |
|---|---|
| Mathematical modeling | Fibonacci sequence, golden ratio |
| Algorithm implementation | Iterative sequence generation |
| Data visualization | matplotlib, color mapping |
| Python | Functions, loops, plotting |
Emmanuel Beristain Guzmán — GitHub
Contributing Feel free to submit issues, fork the repository and send pull requests.