famille_courbes.py

Created by numworks

Created on March 31, 2020

225 Bytes

Trace la famille de courbes cos(nx), lancer draw(n) pour avoir le dessin.


from matplotlib.pyplot import *
from math import *
def draw(n=5):
  x=[t/10 for t in range(-40,40)]
  for i in range(n):
    y=[cos(i*t) for t in x]
    plot(x,y)
  axis((-pi,pi,-2,2))
  grid()
  show()