warp_scalars.py 369 B

12345678910111213
  1. """Warp scalars inside of a Volumetric dataset"""
  2. from vedo import Volume, Cube, Arrows, show, dataurl
  3. vol = Volume(dataurl+"embryo.tif")
  4. source = Cube().scale(3000)
  5. target = Cube().scale([4000,5000,6000]).rotate_x(20).wireframe()
  6. arrs = Arrows(source, target, c='k')
  7. vol.warp(source, target, fit=True)
  8. show(vol, arrs, source, target, __doc__, axes=1, viewup='z')