I am using mayavi.mlab.contour3D to plot the isosurface corresponding to
zero value. I want to colomap the contour based upon some custom properties
(specifically the gradient of the surface). I looked quite a bit but
couldn't find anything relevant. The best I could come across was this link
http://docs.enthought.com/mayavi/mayavi/auto/example_atomic_orbital.html#example-atomic-orbital

The example snippet goes as follows:

    src = mlab.pipeline.scalar_field(Phi)   #The 3D whose isosurface we
want to compute
    src.image_data.point_data.add_array(np.angle(Phi).T.ravel()) # the
customized colormap
    src2 = mlab.pipeline.set_active_attribute(src,point_scalars='scalar') #
I do not understand this completely
    contour = mlab.pipeline.contour(src2) #get the contour, not the same as
mlab.contour3d
    contour2 =
mlab.pipeline.set_active_attribute(contour,point_scalars='angle') #few more
glue steps
    mlab.pipeline.surface(contour2, colormap='hsv') #display the surface



However the contour generated by this code is not the same as the one
obtained from contour3D command.  Any ideas/suggestion would be very
helpful.

Thanks.
Sandeep
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to