from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plot import numpy as np def generate(X, Y, phi): return np.sin(X + 3 * phi) + np.cos(Y + 5 * phi) fig = plot.figure() ax = fig.add_subplot(111, projection='3d') xs = np.linspace(-np.pi, np.pi, 100) ys = np.linspace(-np.pi, np.pi, 100) X, Y = np.meshgrid(xs, ys) Z = generate(X, Y, 0.0) wf = ax.plot_wireframe(X, Y, Z) for phi in np.
![Pythonで3Dワイヤーフレームのアニメーション](https://cdn-ak-scissors.b.st-hatena.com/image/square/fb47ae33cfac22c5f80286286140bb926e6f3567/height=288;version=1;width=512/https%3A%2F%2Fsnap.hyuki.com%2Fstatic%2Fimages%2F1200x630-facebook.png)