Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 320 Bytes
import vtk
from vtkplotter import Grid, Tensors, show
domain = Grid(resx=5, resy=5, c='gray')
# Generate random attributes on a plane
ag = vtk.vtkRandomAttributeGenerator()
ag.SetInputData(domain.polydata())
ag.GenerateAllDataOn()
ag.Update()
ts = Tensors(ag.GetOutput(), scale=0.1)
#ts.printInfo()
show(domain, ts)
You can’t perform that action at this time.