I want to visualize with mayavi a possible surface for Faraday's law of induction in the electrodynamics of a solenoid. I.e. something like a helicoid with a smooth transition to a rectangular area, something like this:
So what would be a good parametrization for this to make a 3d plot.
I tried the following but don't see how to get the transition to the rectangle:
from numpy import pi, sin, cos, mgrid
dphi, dr = pi/25.0, 0.1
[phi,r] = mgrid[0:4*pi:dphi,0:1:dr]
x = r*cos(phi)
y = r*sin(phi)
z = phi/7
from mayavi import mlab
s = mlab.mesh(x, y, z,representation='wireframe')
mlab.show()
