1

I am trying to make a rudimentary model for the a coronal hole in my mathematics thesis. I am looking to create a plot where the radial direction of the cylinder increases with proportionally with the height and then I would like to add twists in the $(\theta, z)$ direction either explicitly or with lines and arrows along the surface.

Currently I have only been able to produce a normal cylinder.

    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()

Cylinder

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
K-Q
  • 133
  • 8
  • 1
    A cone is axially symmetric. How can you add a twist "directly"? It would look all the same, no? – ivan_pozdeev Apr 04 '18 at 16:34
  • I am thinking a vortex - if we have that the radial component is increasing with heright then we can have the fluid rotating around the object, forcing the body to twist. – K-Q Apr 04 '18 at 16:41
  • 1
    For rotationally symmetric objects using cylindrical coordinates makes sense. Apart, there is no z-dependence in the code. Are you asking for the formula of a conical frustum? Is this more a math question? – ImportanceOfBeingErnest Apr 04 '18 at 17:26
  • @ImportanceOfBeingErnest: Essentially yes, what I need to do is vary the z component such that as z increases then r (x) will increase proportionally. I am struggling with how I would go about doing this? Yes It would be a conical frustum essentially - I did not know the name of it! – K-Q Apr 04 '18 at 21:24

0 Answers0