[SciPy-User] Mayavi delaunay3D triangles

Gary Ruben gruben at bigpond.net.au
Thu Mar 11 18:31:06 EST 2010


Hi Boris,

Take a look at the Delaunay graph example in the online Mayavi 
documentation here:
<http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_delaunay_graph.html#example-delaunay-graph>
I think it does what you're asking. If not, examine the data returned by 
the mlab.pipeline.delaunay3d(vtk_source) call.

Also, there's a Mayavi support list here:
<https://mail.enthought.com/mailman/listinfo/enthought-dev>

Gary R.

Borís BURLE wrote:
> Dear all,
> 
> I have a set of points coordinates (x,y,z) representing a surface (in 
> 3D, but it's not a volume). I would like to create a mesh from those 
> points, and then map some values on this mesh (colored surface). Mayavi 
> allows to easily represent the mesh. What I have done so far is:
>    
> pts=mlab.points3d(x,y,z)
> delaunay = mlab.pipeline.delaunay3d(pts)
> surf = mlab.pipeline.surface(delaunay)
> 
> That's create a nice plot of my mesh, but of course without values 
> mapped on the surface. Beforehand, I have been using 
> mlab.triangular_mesh to create such a colored surface (from a vtk-like 
> file), and would be happy to use the same approach. However, 
> triangular_mesh requires the x,y,z positions, plus a list  of triplets 
> defining the connecting triangles. So, my question is: how can I extract 
> those triangles from the delaunay3d object created above? This 
> information is very likely stored somewhere, but after hours of 
> exploration, I haven't been able to extract it!!
> 
>     Thank you in advance for your help !!
>           All the best,
>              B.
> 



More information about the SciPy-User mailing list