def coefficient_directeur(A,B): (u,v) = vecteur(A,B) return v/u def ordonnee_origine(A,B): xA,yA = A return yA-xA*coefficient_directeur(A,B)