# Ep - points de Lagrange import numpy as np import matplotlib.pyplot as plt G=6.67e-11 Ms=2e30 Mt=6e24 d=1.5e11 w2=G*Ms/d**3 m=1 # définition de la zone de calcul x, y x=np.linspace(-3e9,3e9,500) y=np.linspace(-3e9,3e9,500) Ep=np.zeros((500,500)) X,Y=np.meshgrid(x,y) # calcul de l'Ep TM=(X**2+Y**2)**0.5 SM=((X+d)**2+Y**2)**0.5 Ep=-G*Ms*m/SM-G*Mt*m/TM-0.5*m*SM**2*w2 #----------------------------------------------------------------------------- plt.figure(figsize=(10,8)) plt.contour(X,Y,-Ep,1000,colors='black') plt.show() plt.figure(figsize=(10,8)) plt.plot(x,Ep[250,:],-1.34e9) plt.axis([-3e9, 3e9, -1.34e9,-1.334e9]) plt.grid() plt.show() plt.figure(figsize=(10,8)) plt.plot(x,Ep[:,375]) plt.grid() plt.show()