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")
Out[7]:
[<matplotlib.lines.Line2D at 0x7fa0717e64e0>]
In [ ]: