I obtain a 2nd order tensor and want to display it in paraview. I already obtain the Eigenvalues and Eigenvectors and write them to a VTK file as an example:
# vtk DataFile Version 2.0 Tensor Demo ASCII DATASET UNSTRUCTURED_GRID POINTS 1 float 2.66400000 2.66400000 2.66400000 POINT_DATA 1 VECTORS Direction0 float 0.23126293 -0.07631338 1.12408371 VECTORS Direction1 float 1.00516616 -0.39659351 -0.23372197 VECTORS Direction2 float 0.27137654 0.69298126 -0.00878546 TENSORS OrientTensor float 0.23126293 -0.07631338 1.12408371 1.00516616 -0.39659351 -0.23372197 0.27137654 0.69298126 -0.00878546
For reference, I also wrote the 3 orthogonal vectors:
Now, it is straight forward to create a tensorglyph, however for better visual interpretation of the resulting glyph, I would like to color it according to the distance from the center of the point, ie, the distance of the ellipsoidal surface to the point the tensor is defined on.
Is there a filter to calculate the distance and apply it on the tensor?