Skip to content

net421/phi-rectangles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Phi Rectangles — Mathematical Modeling in Python

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.


What This Project Demonstrates

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 Math Behind It

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

Requirements

pip install matplotlib numpy

Usage

git clone https://github.com/net421/phi-rectangles.git
cd phi-rectangles
python "phi rectangles.py"

Skills Demonstrated

Area Detail
Mathematical modeling Fibonacci sequence, golden ratio
Algorithm implementation Iterative sequence generation
Data visualization matplotlib, color mapping
Python Functions, loops, plotting

Author

Emmanuel Beristain Guzmán — GitHub

Contributing Feel free to submit issues, fork the repository and send pull requests.

About

this code create rectangles based on phi number

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages