I assume you have not seen the chapter "Python scripting for 3D plotting". There is a collection of Mayavi commands that can be used inside python. For example, the section "3D construction functions for numpy arrays" . If you follow the links, you will find a description of the functions and a small example for each of them.
In your case, you should take mesh or surf . Both functions are equal but different. For example, the surf function is a more subfunction of the mesh , which, in my opinion. You do not need to determine the x and y coordinates, you just need the z coordinates in the 2D array. If you want to use mesh , you need to pass all three coordinates (x, y, z) as 2D arrays.
I would suggest checking out the examples.
Is this the answer to your question? Maybe you should be more specific about what you want to do.
Have a nice day and happy holidays.
source share