# Glyph mode with fixed spacing between the glyphs

**URL:** https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096
**Category:** ParaView Support
**Created:** [September 29, 2021, 8:54am UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096 "2021-09-29T08:54:37Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![SCRO1022](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@SCRO1022](https://discourse.paraview.org/u/SCRO1022)
#### Post date: [September 29, 2021, 8:54am UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/1 "2021-09-29T08:54:37Z")

</div>

Hey there,

I am trying to make animations over time of a velocity field slice, similar as done in my attached example  
video [test|video](https://discourse.paraview.org/uploads/short-url/vxAbIhu1VbB5luyx6dzOcaXnSHw.avi) .  
At the moment we do plots and animation like this with Star-CD where we can define a fixed spacing grid of the glyphs, so these glyphs are every timestep at the same position even with changing bounds of the geometry (e.g. piston moving up and down in ICE-applications).

I tried the glyph filter in paraview on a slice, but couldn’t manage to get a satisfying result. There are different options for the glyph mode: Bounds based, surface sampling, every nth point … but none of these works well for me, because the mesh, slice surface and the bounds are changing over time and therefore the glyphs are new located every timestep. I need a solution to sample a plane with a glyph spacing of e.g. 2mm in x-direction and 2mm in y-direction. Is there any possibility right now maybe with glyphs with custom source?

Thank you!!  
[test|video](https://discourse.paraview.org/uploads/short-url/vxAbIhu1VbB5luyx6dzOcaXnSHw.avi)

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 29, 2021, 2:16pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/2 "2021-09-29T14:16:57Z")

</div>

Instead of slicing your data, try creating a `Plane` source covering where the slice would be. Set the `X Resolution` and `Y Resolution` parameters to the grid size of glyphs you want. Unfortunately, the `Plane` source does not have a nice 3D Widget to place it like the `Slice` filter does, so you will have to enter the coordinates by hand. Set `Origin` to one of the corners (say the “lower-left”). Set `Point1` to one of the adjacent corners (e.g. the “lower-right”) and `Point2` to the other adjacent corner (e.g. the “upper-left”).

Once you made the plane, use the `Resample With Dataset` filter to put the velocity field on the plane. Set the `Source Data Arrays` to your 3D dataset and `Destination Mesh` to the plane you just made.

Now just add the `Glyph`s to the plane. Set the `Glyph Mode` to `All Points` since you presumably already defined the spacing with the `Plane` resolution parameters.

---

<div class="post-metadata">

### Author: ![SCRO1022](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@SCRO1022](https://discourse.paraview.org/u/SCRO1022)
#### Post date: [September 29, 2021, 3:08pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/3 "2021-09-29T15:08:58Z")

</div>

Hey Kenneth,

thank you so much! I am getting closer to the desired results, but it is still not exactly how i want it, because the glyphs outside of the cut velocity field are also shown. I only want the glyphs inside this region. Maybe it works with a threshold on the glyphs?

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 29, 2021, 3:15pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/4 "2021-09-29T15:15:36Z")

</div>

I’m not sure what you mean by “outside of the cut”. If you mean values that are outside of the bounds of your volume, then you can `Threshold` by the `vtkValidPointMask` field that `Resample With Dataset` generates.

---

<div class="post-metadata">

### Author: ![SCRO1022](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@SCRO1022](https://discourse.paraview.org/u/SCRO1022)
#### Post date: [September 29, 2021, 3:15pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/5 "2021-09-29T15:15:52Z")

</div>

And it seems the Glyphs are still not completly evenly spaced. It looks still a bit irregular…

 ![grafik](https://discourse.paraview.org/uploads/default/original/2X/a/aa0f6d7913cee28395eacfc8604b2458cad85472.png)

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 29, 2021, 3:26pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/6 "2021-09-29T15:26:41Z")

</div>

Are you applying the `Threshold` to the glyphs (as opposed to the input to the glyphs)?

Are you sure that the `Glyph Mode` filter is set to `All Points`?

Can you draw the wireframe of the plane along with the glyphs?

---

<div class="post-metadata">

### Author: ![SCRO1022](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/s/aca169/32.png) [@SCRO1022](https://discourse.paraview.org/u/SCRO1022)
#### Post date: [September 30, 2021, 6:45pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/7 "2021-09-30T18:45:12Z")

</div>

oh man thank you, you were right. I didn’t set to all points… Now i finally get the desired results! Thank you so much 🙂  
But i need the threshold in the end and set the minimum value to 0.0001 because all the glyphs outside my domain get the values 0.

 ![grafik](https://discourse.paraview.org/uploads/default/original/2X/2/296c51feb6a3cfee9a8989bf1fecbfc97de7fb4c.png)  
 ![grafik](https://discourse.paraview.org/uploads/default/original/2X/5/55d7c499fe093632c16141fa2deccaaf97156368.png)

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [September 30, 2021, 8:42pm UTC](https://discourse.paraview.org/t/glyph-mode-with-fixed-spacing-between-the-glyphs/8096/8 "2021-09-30T20:42:31Z")

</div>

Right. You can also threshold on the glyphs using the `vtkValidPointMask` field instead of the vectors.
