On 14/02/2012 14:07, Alan Gauld wrote:
On 14/02/12 13:56, Debashish Saha wrote:
for r in range (1,5):
...
z=r
mlab.mesh(x, y,z, colormap='Greens')
...
AssertionError: Array z must be 2 dimensional.
And your question is?
It's implied, please do my work for me because I can't be bothere
On 14/02/12 13:56, Debashish Saha wrote:
for r in range (1,5):
...
z=r
mlab.mesh(x, y,z, colormap='Greens')
...
AssertionError: Array z must be 2 dimensional.
And your question is?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_
from __future__ import division
import numpy
from enthought.mayavi import mlab
for r in range (1,5):
print r
pi = numpy.pi
cos = numpy.cos
sin = numpy.sin
dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
[s,theta]=numpy.mgrid[0.01:r+0.015:.01,0:2*pi+dtheta*1.5:dtheta]
x=s*co