import numpy as np
import matplotlib.pyplot as pl
g = 9.8
v1 = 100
v2 = 50
v3 = 20
cof = np.arange(0,1,0.01)
def stopping_distance(cof, v):
return v*v/2.0/cof/g
y1 = stopping_distance(cof, v1)
y2 = stopping_distance(cof, v2)
y3 = stopping_distance(cof, v3)
pl.plot(cof,y1,'g',label='v = 100')
pl.plot(cof,y2,'r',label='v = 50')
pl.plot(cof,y3,'b',label='v = 20')
pl.ylabel("distance")
pl.xlabel("cof")
pl.ylim([0,10000])
pl.legend()