# coding: utf-8 # # Proportions of the Golden Section # In[2]: import matplotlib.pyplot as pt from math import sqrt # In[3]: a = 0 b = 1 m1 = a + (1-(sqrt(5)-1)/2) * (b-a) m2 = a + (sqrt(5)-1)/2 * (b-a) # In[7]: pt.xlim([a-0.5, b+0.5]) pt.grid() pt.plot([a,b], [0,0], "ob") pt.plot([m1, m2], [0,0], "or") # In[ ]: