Python libraries used: Numpy, Matplotlib.pyplot.
In this coursework/project:
Defined two functions,
- Polar2cart : Function to convert plane polar coordinates to cartesian.
- floretpositions : Function to compute the positions of florets based on the max. number of florets i.e. the parameter nmax and the parameter ndiff (ndiff = 0 corresponds to floret positions that line on a Fermat spiral).
Using these functions, the information from Fermatspiral.py, and the expressions in the question sheet, a study of floret positions was carried out. For different values of ndiff, various floret positions were computed. In the case of a sunflower, the floret positions lie on a Fermat spiral (i.e. ndiff = 0).
I have attached the relevant question sheet and recommend that it be read while you're looking at the code. The programs were written in a Jupyter Notebook which has also been attached.
Data file(s) used i.e. Fermatspiral.py have also been attached.
If you need any more information/explanation related to the code, don't hesitate to contact me.