rectl_grid1.py 646 B

1234567891011121314151617181920
  1. """A RectilinearGrid is a dataset where edges are parallel to the coordinate axes.
  2. It can be thought of as a tessellation of a box in 3D space, similar to a Volume
  3. except that the cells are not necessarily cubes, but they can have different
  4. lengths along each axis."""
  5. from vedo import *
  6. xcoords = 7 + np.sqrt(np.arange(0,900,25))
  7. ycoords = np.arange(0, 20)
  8. zcoords = np.arange(0, 20)
  9. rgrid = RectilinearGrid([xcoords, ycoords, zcoords])
  10. print(rgrid)
  11. # print(rgrid.x_coordinates().shape)
  12. # print(rgrid.has_blank_points())
  13. # print(rgrid.compute_structured_coords([20,10,11]))
  14. msh = rgrid.tomesh().lw(1)
  15. show(msh, __doc__, axes=1, viewup="z")