# Drawing isocontour data of 3d discrete volume with mayavi2

I'm trying to visualize the propagation of heat in a discrete sphere surface. The sphere is hollow, only the voxels of the boundary have value.

Visualization in matlab using isosurface shows correct color over the surface.

I would like to show iso-contours over this visualization but this is difficult in matlab. Searching for alternatives to visualize the data I've found python + numpy + mayavi2 and immediately fell in love with them.

Playing with maiavi I can obtain my desired kind of plots with parametric surfaces but I cannot reproduce the same results with my volumetric, discrete sphere. The following code,

lines = [0.1, 0.3, 0.5, 0.7, 1, 1.5, 1.8, 2.3, 2.8, 3.0, 3.1]
mlab.contour3d(heatmap,contours=lines)


only shows uniform color sphere. Enabling contours or not, does not change the result. No iso-heat lines nor even color over the surface

Anyone knows the correct approach to show the iso-heat contours?

• What is the variable heatmap here? A scalar field? If so, you are seeing the sphere associated with the outermost isocontour. – meawoppl Jun 10 '12 at 7:28