File:Catenoid.gif

From testwiki
Jump to navigation Jump to search
    Original file (800 × 600 pixels, file size: 1.47 MB, MIME type: image/gif, looped, 31 frames, 6.2 s)
    Note: Due to technical limitations, thumbnails of high resolution GIF images such as this one will not be animated.

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Construction of a catenoid as the rotation of a catenary arc.
    Español: Construcción de un catenoide como la rotación de un arco de catenaria.
    Türkçe: Bir katenoidin zincir eğrisinin dönüşü ile yapımı.
    Date
    Source Own work
    Author Nicoguaro
    GIF development
    InfoField
     This plot was created with Matplotlib.
    Source code
    InfoField

    Python code

    import numpy as np
    from mpl_toolkits.mplot3d import Axes3D
    import matplotlib.pyplot as plt
    import matplotlib.animation as animation
    from matplotlib import rcParams
    
    # In Windows the next line should provide the full path to convert.exe
    # since convert is a Windows command
    rcParams['animation.convert_path'] = "C:\Program Files\ImageMagick-6.9.3-Q16\convert.exe"
    rcParams['font.size'] = 12
    
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')
    plot_args = {'rstride': 3, 'cstride': 1, 'cmap':"Spectral",
                 'linewidth': 0.1, 'antialiased': True, 'color': 'k',
                 'shade': True, 'alpha': 0.5}
    
    u = np.linspace(0, 2*np.pi, 30)
    v = np.linspace(-1, 1, 30)
    
    c = 1
    x = c * np.outer(np.cosh(v/c), np.cos(u))
    y = c * np.outer(np.cosh(v/c), np.sin(u))
    z = np.outer(v, np.ones_like(u))
    surf = ax.plot_surface(x[:, 0], y[:, 0], z[:, 0], **plot_args)
    line = ax.plot(x[:, 0], y[:, 0], z[:, 0], 'k', lw=2)
    ax.set_xlim(-2, 2)
    ax.set_ylim(-2, 2)
    ax.set_zlim(-1, 1)
    plt.xlabel(r"$x$", fontsize=16)
    plt.ylabel(r"$y$", fontsize=16)
    ax.set_zlabel(r"$z$", fontsize=16)
    
    
    def data_gen(num):
        surf = ax.plot_surface(x[:, :num], y[:, :num], z[:, :num], **plot_args)
        line = ax.plot(x[:, num-1], y[:, num-1], z[:, num-1], 'k', lw=2)
        ax.view_init(elev=35, azim=45)
        return surf, line
    
    
    ani = animation.FuncAnimation(fig, data_gen, range(31), blit=False)
    ani.save("Catenoid.gif", writer='imagemagick')
    plt.show()
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution
    This file is licensed under the Creative Commons Attribution 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    14 February 2016

    image/gif

    83e56f0cc574713323154989f6328be0ba7eb166

    1,539,690 byte

    6.200000000000003 second

    600 pixel

    800 pixel

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current18:15, 14 February 2016Thumbnail for version as of 18:15, 14 February 2016800 × 600 (1.47 MB)wikimediacommons>NicoguaroUser created page with UploadWizard

    There are no pages that use this file.