| Hosted by CoCalc | Download
Kernel: Python 2 (system-wide)

Détermination de la loi E/S du portail

from JSAnimation import IPython_display import matplotlib.pyplot as plt import numpy as np from matplotlib import animation

On se propose de déterminer la relation entre α\alpha et θ\theta

Schéma cinématique du portail

OA=ax0+by0\overrightarrow{OA}= -a\cdot \overrightarrow{x_0} + b\cdot \overrightarrow{y_0} avec a=100, b=160, AB=Lx1\overrightarrow{AB}= L\cdot \overrightarrow{x_1} , L=280 OC=cx3+dy3\overrightarrow{OC}= c\cdot \overrightarrow{x_3} + d\cdot \overrightarrow{y_3} avec c=422, d=20 CB=Ly2\overrightarrow{CB}= L\cdot \overrightarrow{y_2}

#données a=100 b=160 d=20 c=422 L=280 #bati S0 A=[-a,b] O=[0,0] #vantail 3 C=[c,d] # dans (x3,y3) #bras1 B=[L,0] # dans (x1,y1)
#vantail 3 def pos_vantail (alpha): alpharad=(alpha)*np.pi/180 Cx0=c*np.cos(alpharad)-d*np.sin(alpharad) #coordonnées dans (x0,y0) Cy0=c*np.sin(alpharad)+d*np.cos(alpharad) #coordonnées dans (x0,y0) return Cx0, Cy0
XC=np.zeros(90) YC=np.zeros(90) AC=np.zeros((90,2)) XI=np.zeros(90) YI=np.zeros(90) alphaC=np.zeros(90) for i in range(0,90) : XC[i], YC[i]=pos_vantail(i) #attention l'angle sur le schéma évolue de 0 à -90 AC[i]=[XC[i]-A[0],YC[i]-A[1]] ACx=AC[i][0] ACy=AC[i][1] XI[i]=A[0]+ACx/2 YI[i]=A[1] +ACy/2 d_AI=np.sqrt((ACx/2)**2+(ACy/2)**2) alphaC[i]=np.arctan2(ACy,ACx) alphaB=np.arccos(d_AI/L) alphaC[i]=180/np.pi*(alphaC[i]+alphaB) # print(alphaC)
theta=range(0,90) plt.plot(theta,alphaC) plt.show()
Image in a Jupyter notebook