Hi Luke,

On Fri, Sep 17, 2010 at 5:49 PM, Dale Lukas Peterson
<hazelnu...@gmail.com> wrote:
>
>  I'm not sure I understand how I would make use of my function then.
>  My function needs to be evaluated over a 3-d mesh (x, y, and z) , and then 
> the
>  level surfaces (not contour lines) calculated.  I guess I could treat
>  z as a parameter, then plot the zero level contour lines of my function for
>  a discrete number of z values, but then I would need to adjust the
>  height that each countour line is plotted at when I do the 3-d plot.
>  This still would only give bunch of vertically stacked contour
>  lines, rather than a nice smooth 3-d surface.
>
>  If I'm misunderstanding what you meant, perhaps you could point me
>  to an example of something that makes a level surface of a function
>  of 3 (not 2) variables?

You're looking for an isosurface; as far as I know matplotlib does not
have isosurface modules, only 2-d contours embedded in 3d (such as
those illustrated in
http://matplotlib.sourceforge.net/examples/mplot3d/contourf3d_demo.html).

VTK does have powerful isosurface capabilities, nicely exposed by mayavi:

http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_helper_functions.html#contour3d

If the mlab helper isn't sufficient for you, you can create directly
VTK isosurfaces, the heart example is a good point to start learning:

http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/example_heart.html

Regards,

f

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to