Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One suggestion would be to use

surfaces = [ParametrizedSurface3D( (x,y,exp(-(x^2+y^2)/n)), (x,y)) for n in range(1,M+1)]
plot = sum([ s.plot(color=rainbow(M)[i],opacity=0.5) for i,s in enumerate(surfaces)])

Just learned that ParametrizedSurface3D is a surface object, not a plot. So we first create the surfaces and then we render the plot, which will be the sum of all plots of the previously defined surfaces. I guess you can replace exp(-(x^2+y^2)/n by any other function, but that is just a guess.