Multiple vectors on one point

Hi, I’ve been looking a long time for how to visualize local frames (3 orthonormal vectors in 3D) at some chosen points in a solid. My idea was to define 3 superposed points for each origin and assign a vector to each of them.

My inputs only are the origin 3 coordinates and the 9 vectors coordinates of the frame.

For 2 frames, it would give something like :

# vtk DataFile Version 2.0
vectors
ASCII

DATASET UNSTRUCTURED_GRID
POINTS 6 float
0 0 0
0 0 0.0000000001
0 0.0000000001 0
1 0 0
1 0 0.0000000001
1 0.0000000001 0

POINT_DATA 6
VECTORS vec float
1 0 0
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1 

Is this the right way to do this ? I’ve noticed than paraview doesn’t understand superposed points, which explains the biais .0000001 but this is quite ugly, can you help me finding a better solution ?
Thank you very much,
Gaetan

You shouldn’t need to duplicate points in the input. Instead, just list all the origins once in the file. Note that the number 6 in

POINTS 6

refers to the total number of numbers in the point list, so it should be set to 3*N where N is the number of points.

You can associate each of the orthogonal directions as a separate 3-component vector field. Again, the number following POINT_DATA is the total number of values in the point data array, so 3*N. Define each vector with a separate VECTORS section, e.g.,

VECTORS vec1 float
<data values for vec1 go here>
VECTORS vec2 float
<data values for vec2 go here>
VECTORS vec3 float
<data values for vec3 go here>

Once you load in the data file, you should see the three different vector fields. You can then create three Glyph filters, each one oriented by either vec1, vec2, or vec3.

Well thank you very much it solved my problem though I didn’t really understand the 3*N number following POINTS and POINT_DATA since it only works with N. For those interested, here my sample code of what I wanted to do :

# vtk DataFile Version 2.0
vectors
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 2 float
0 0 0
1 1 1
POINT_DATA 2
VECTORS vec1 float
1 0 0
1 0 0
VECTORS vec2 float
0 1 0
0 1 0
VECTORS vec3 float
0 0 1
0 0 1

Mea culpa. You are right, it should just be N. I should have consulted the VTK formats guide, but thought I knew the format sufficiently well.