Catenoid.gif(800 × 600像素,文件大小:1.47 MB,MIME类型:image/gif、​循环、​31帧、​6.2秒)


摘要

描述
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ı.
日期
来源 自己的作品
作者 Nicoguaro
GIF开发
InfoField
 
本GIF 位图使用Matplotlib创作。
源代码
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()

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
w:zh:知识共享
署名
本文件采用知识共享署名 4.0 国际许可协议授权。
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

83e56f0cc574713323154989f6328be0ba7eb166

1,539,690 字节

6.200000000000003

600 像素

800 像素

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2016年2月14日 (日) 17:152016年2月14日 (日) 17:15版本的缩略图800 × 600(1.47 MB)NicoguaroUser created page with UploadWizard

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: