将金属板线圈彼此叠放的情节
我已经弄清楚了如何创建一个钣金线圈,现在我需要在另一个之上堆叠
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
L = 100
h= 0.5
r= 20
R = np.sqrt((L*h)/(np.pi)+r**r)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
xpoints=[]
ypoints=[]
for theta in np.linspace(0,r,L):
xpoints.append(1.1*theta*np.cos(theta))
ypoints.append(1.1*theta*np.sin(theta))
z = np.linspace(0,L)
theta, z = np.meshgrid(theta, z)
cyl= ax.plot_surface(xpoints,ypoints,z, rstride=1, cstride=1, linewidth=0, antialiased=True,zorder = 0.5)
我需要将这两个图一起绘制,可能是5个或10个,如图2所示。