# Multiple vectors on one point

**URL:** https://discourse.paraview.org/t/multiple-vectors-on-one-point/2069
**Category:** ParaView Support
**Tags:** vtk
**Created:** [June 18, 2019, 2:34pm UTC](https://discourse.paraview.org/t/multiple-vectors-on-one-point/2069 "2019-06-18T14:34:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gdesrues](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/57b2e6/32.png) [@gdesrues](https://discourse.paraview.org/u/gdesrues)
#### Post date: [June 18, 2019, 2:34pm UTC](https://discourse.paraview.org/t/multiple-vectors-on-one-point/2069/1 "2019-06-18T14:34:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 18, 2019, 3:23pm UTC](https://discourse.paraview.org/t/multiple-vectors-on-one-point/2069/2 "2019-06-18T15:23:39Z")

</div>

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.,

```auto
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`.

---

<div class="post-metadata">

### Author: ![gdesrues](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/57b2e6/32.png) [@gdesrues](https://discourse.paraview.org/u/gdesrues)
#### Post date: [June 19, 2019, 8:56am UTC](https://discourse.paraview.org/t/multiple-vectors-on-one-point/2069/3 "2019-06-19T08:56:50Z")

</div>

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
```

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 19, 2019, 1:57pm UTC](https://discourse.paraview.org/t/multiple-vectors-on-one-point/2069/4 "2019-06-19T13:57:55Z")

</div>

> [@gdesrues](#):
>
> though I didn’t really understand the 3\*N number

Mea culpa. You are right, it should just be N. I should have consulted the [VTK formats](https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf) guide, but thought I knew the format sufficiently well.
