[SciPy-User] Mayavi delaunay3D triangles

Borís BURLE boris.burle@univ-provence...
Thu Mar 11 00:42:04 CST 2010


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.

-- 
Borís BURLE
Laboratoire de Neurobiologie de la Cognition
CNRS et Université de Provence
tel: (+33) 4 88 57 68 79
fax: (+33) 4 88 57 68 72
web page:  http://www.up.univ-mrs.fr/lnc/ACT/act-fr.html



More information about the SciPy-User mailing list