I am trying to convert mayavi models to 'u3d' files that I can embed in
python. Below I describe the method I use. I attach an example that
results in strange artifacts. The mesh is created in mayavi using the
mlab.contour3d function. In the mayavi the mesh looks ok (see the
attached png). In the pdf, the triangles of the mesh are colored with
different colors. It seems that something is wrong with the mesh, but I
don't know what it is. I will appreciate any assistance.
My method is as follows:
1) Save the mayavi figure as '.wrl' file.
2) Import the wrl file into Meshlab and export it to 'idtf' file.
3) Fix the vertex color issue using the explanations in:
http://www.fitzroy.com/ian/3dreconstruction/index.php#results2 4) Convert the 'idtf' file to 'u3d'
5) Convert the 'u3d' file to pdf using miktex. I change the latex
package from movie15 to media9.