我正在尝试为我的数学论文中的日冕洞制作一个基本模型。我正在寻找一个图,其中圆柱的径向与高度成比例地增加,然后我想在 $(\theta, z)$ 方向上添加扭曲,或者显式地或沿着表面的线和箭头。
目前我只能生产一个普通的气缸。
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
# Cylinder
x=np.linspace(-1, 1, 100)
z=np.linspace(-2, 2, 100)
Xc, Zc=np.meshgrid(x, z)
Yc = np.sqrt(1-Xc**2)
# Draw parameters
rstride = 20
cstride = 10
ax.plot_surface(Xc, Yc, Zc, alpha=0.2, rstride=rstride, cstride=cstride)
ax.plot_surface(Xc, -Yc, Zc, alpha=0.2, rstride=rstride, cstride=cstride)
ax.set_xlabel("X")
#ax.set_ylabel("Y")
fig.gca().set_ylabel(r'$\theta$')
ax.set_zlabel("Z")
plt.figure(figsize=(200,70)) #sets the size of the plot
#plt.show()