Fichier:Cylindre ayant un comportement élastique linéaire.gif

De testwiki
Aller à la navigation Aller à la recherche
    Fichier d’origine (640 × 480 pixels, taille du fichier : 845 kio, type MIME : image/gif, en boucle, 120 trames, 7,2 s)
    Remarque : en raison de limitations techniques, les vignettes des images GIF en haute résolution telles que celle-ci ne seront pas animées.

    Ce fichier provient de Wikimedia Commons et peut être utilisé par d'autres projets. Sa description sur sa page de description est affichée ci-dessous.

    Description

    Description
    Français : Déformation élastique de ce cylindre lorsqu'une force (schématisé par les flèches rouges) est appliquée sur ses extrémités.
    Date
    Source Travail personnel
    Auteur ou autrice Clevyyy

    Conditions d’utilisation

    Moi, en tant que détenteur des droits d’auteur sur cette œuvre, je la publie sous la licence suivante :
    w:fr:Creative Commons
    paternité partage à l’identique
    Vous êtes libre :
    • de partager – de copier, distribuer et transmettre cette œuvre
    • d’adapter – de modifier cette œuvre
    Sous les conditions suivantes :
    • paternité – Vous devez donner les informations appropriées concernant l'auteur, fournir un lien vers la licence et indiquer si des modifications ont été faites. Vous pouvez faire cela par tout moyen raisonnable, mais en aucune façon suggérant que l’auteur vous soutient ou approuve l’utilisation que vous en faites.
    • partage à l’identique – Si vous modifiez, transformez ou vous basez sur cet élément, vous devez distribuer votre contribution sous une license identique ou compatible à celle de l’original.

    Python code

    Here is the code in python to generate this GIF.

       import numpy as np
       import matplotlib.pyplot as plt
       from mpl_toolkits.mplot3d import Axes3D
       import matplotlib.animation as animation
       
       def cylinder(center_x,center_y,center_z,radius,height_z):
           z = np.linspace(center_z- height_z/2, center_z + height_z/2, 50)
           theta = np.linspace(0, 2*np.pi, 50)
           theta_grid, z_grid=np.meshgrid(theta, z)
           x_grid = radius*np.cos(theta_grid) + center_x
           y_grid = radius*np.sin(theta_grid) + center_y
           return x_grid,y_grid,z_grid
       
       
       fig = plt.figure()
       ax = fig.add_subplot(111, projection='3d')
       
       h=1
       b=0.1
       
       Xc,Yc,Zc = cylinder(0,0,0,b,h)
       surf = ax.plot_surface(Xc, Yc, Zc, alpha=0.3, linewidth=0,zorder=0)
       ax.set(xlim=[-0.3,0.3],ylim=[-0.3,0.3], zlim=[-1,1])
       text = ax.text(0, 0, 1.5, "Texte initial", color='black')
       quivers = ax.quiver(0,0,h,0,0,-1,length=0,color="r",pivot="tail",linewidth=3.9,alpha=1,zorder=10)
       quivers2 = ax.quiver(0,0,-h,0,0,-1,length=0,color="r",pivot="tail",linewidth=3.9,alpha=1,zorder=10)
       
       def update(frame):
           global surf
           global quivers
           global quivers2
           surf.remove() 
           quivers.remove()
           quivers2.remove()
           ax.grid(False)
           h = 1 + 0.2*np.sin(2 * np.pi*frame/Nframe)
           b = 0.1 - 0.01*np.sin(2 * np.pi*frame/Nframe)
           F = 1*2*np.sin(2 * np.pi*frame/Nframe)
           color = 'blue'
           Xc,Yc,Zc = cylinder(0,0,0,b,h)
           
           surf = ax.plot_surface(Xc, Yc, Zc, alpha=0.3, color='b')
       
       
           length = -F/2
           allongement = 0.2*np.sin(2 * np.pi*frame/Nframe)
           if allongement > 0:
               quivers = ax.quiver(0,0,Zc[-1],0,0,-0.5,length=length,color="r",pivot="tail",linewidth=1,alpha=1,zorder=100)
               quivers2 = ax.quiver(0,0,Zc[0],0,0,0.5,length=length,color="r",pivot="tail",linewidth=1,alpha=1,zorder=100)
           else:
               quivers = ax.quiver(0,0,Zc[-1]-allongement,0,0,0.5,length=-length,color="r",pivot="middle",linewidth=1,alpha=1,zorder=10)
               quivers2 = ax.quiver(0,0,Zc[0]+allongement,0,0,-0.5,length=-length,color="r",pivot="middle",linewidth=1,alpha=1,zorder=10)
       
           text.set_text(f"Allongement: {h-1:.2f} \nForce: {F:.2f}")
           return 
       
       Nframe = 120
       anim = animation.FuncAnimation(fig, update, frames = Nframe, interval=30)
       writer = animation.PillowWriter(fps=15,bitrate=1800)
       anim.save("test.gif",writer=writer)
       
       plt.show()
    

    Légendes

    Ajoutez en une ligne la description de ce que représente ce fichier

    Éléments décrits dans ce fichier

    dépeint

    image/gif

    865 586 octet

    480 pixel

    640 pixel

    f0d75e98dc3bd702dfce1787c4631b98f8e449d3

    Historique du fichier

    Cliquer sur une date et heure pour voir le fichier tel qu'il était à ce moment-là.

    Date et heureVignetteDimensionsUtilisateurCommentaire
    actuel19 février 2025 à 11:55Vignette pour la version du 19 février 2025 à 11:55640 × 480 (845 kio)wikimediacommons>ClevyyyUploaded while editing "Déformation élastique" on fr.wikipedia.org

    Aucune page n’utilise ce fichier.