我正在try 制作一个我在3D互动中完成的情节,这样我就可以移动它,以便从其他Angular 看到它.
cut_k = 0.35
height = 3
#slice at k = 0.08
#Create data for the cylinder
theta = np.linspace(0, 2 * np.pi, 1000)
z_cylinder = np.linspace(0, height, 1000)
theta, z_cylinder = np.meshgrid(theta, z_cylinder)
x_cylinder = cut_k* np.cos(theta)
y_cylinder = cut_k* np.sin(theta)
#plot surface
fig = plt.figure(figsize=(7, 7))
axes = fig.add_subplot(111, projection='3d')
axes.plot_surface(x_cylinder, y_cylinder, z_cylinder, color='red', alpha=1)
这是我的密码.