How to render polygonal planes in Mayavi2?

I have difficult times to render many planes in 3D (e.g. from 4 points) using Mayavi2 with Python. I could not find the polygon command in Mayavi2, tried to use grid, surf, etc., but in most cases it was unsuccessful or with problems. One problem, for example, in using a grid:

x = array([0,0,1.5,1]).reshape(2,-1)
y = array([0,1,0.5,1]).reshape(2,-1)
z = array([1,1,1.0,1]).reshape(2,-1)
mlab.mesh(x,y,z)

I'm not sure, but I see that the grid is the wrong solution. Because it allows you to create 2D arrays! which is unavailable. Any comments and code snippets are greatly appreciated. Developer

+3
source share

All Articles