# Getting uniformly distributed points

**URL:** https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796
**Category:** ParaView Support
**Created:** [October 17, 2019, 12:39pm UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796 "2019-10-17T12:39:06Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 17, 2019, 12:39pm UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/1 "2019-10-17T12:39:06Z")

</div>

Hello all,  
I am a very new user of Paraview so I apologize in advance if my question is very trivial to some.  
I have a 2D surface extracted from a 3D one (x-y plane, i;e, y=f(x)). When I extract the data, the points are not uniformly distributed over the x-axis. That is, the distance between the x-coordinates of the points is not uniform. How can I fix this and get samples of the surface with a fixed distance along the x-axis? Thank you in advance for the help.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 17, 2019, 2:08pm UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/2 "2019-10-17T14:08:52Z")

</div>

You want to use Ressample with Dataset filter.

- Create a plane source with the resolution and position you want
- Click on your 3D dataset in the pipeline browser
- Add a RessampleWithDataSet filter
- Select the plane as the “Destination Mesh”
- Apply

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 17, 2019, 4:03pm UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/3 "2019-10-17T16:03:15Z")

</div>

Thank you for your reply Mathieu, but unfortunately, I am always getting an empty plane with no points  
when I follow the steps you mentioned!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 18, 2019, 2:57am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/4 "2019-10-18T02:57:19Z")

</div>

Here is an example state file :  
[ressamplePlane.pvsm](https://discourse.paraview.org/uploads/short-url/6kZ2a4wg8XPGT5SgwJyqKIvheKi.pvsm) (447.4 KB)

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 21, 2019, 7:55am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/5 "2019-10-21T07:55:59Z")

</div>

Extremely grateful for your reply Mathieu. I have followed the same procedure, but for some reason, the data projection on the plane I create has data points everywhere (as can be seen in the attached example[resamplePlane2.pvsm](https://discourse.paraview.org/uploads/short-url/qJVjsFDIQRBzAPlV8YKAWCLCVxz.pvsm) (329.7 KB) )!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 21, 2019, 8:06am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/6 "2019-10-21T08:06:52Z")

</div>

You need to provide your dataset ClosedRFSurfaceVOI\_meters.vtk for me to test.

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 21, 2019, 8:14am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/7 "2019-10-21T08:14:43Z")

</div>

Thanks again for the reply. The data size is a bit large, I uploaded it to a drive accessible from [here](https://drive.google.com/file/d/15ZCyRgWDm3UHo-OIQc0N3KVFzD9H48Vg/view?usp=sharing).

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 21, 2019, 8:46am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/8 "2019-10-21T08:46:08Z")

</div>

I misunderstood what you are trying to do.

It looks like you do not have a 3D dataset, but a 2D polygonal mesh ,which happens to be a closed surface.

Please explain what you are trying to do simply but fully.

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 21, 2019, 8:57am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/9 "2019-10-21T08:57:59Z")

</div>

I need to extract a slice of the surface over the x-z plane for post-processing. I was doing so simply using the slice filter, but then the extracted data points would sample this slice nonuniformally, which would make my post-processing algorithm unnecessarily complicated.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 21, 2019, 8:59am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/10 "2019-10-21T08:59:05Z")

</div>

A slice of a surface is a line. Is this what you are looking for ?

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 21, 2019, 9:16am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/11 "2019-10-21T09:16:21Z")

</div>

All I need is the data points of the outline of the surface. Exactly as you get using the slice filter applied to my dataset but with a uniform distance between the data points. Apologies if I was unclear.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 21, 2019, 9:26am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/12 "2019-10-21T09:26:22Z")

</div>

Much more clear now. You want the point on the line of the slice to have an uniform distance between them ?

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 21, 2019, 9:27am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/13 "2019-10-21T09:27:23Z")

</div>

Exactly.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [October 21, 2019, 9:30am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/14 "2019-10-21T09:30:34Z")

</div>

There is no way to do that in ParaView directly.

You may be able to implement it yourself in a Programmable Filter, but it is not a trivial algorithm.

---

<div class="post-metadata">

### Author: ![y.abdoush](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@y.abdoush](https://discourse.paraview.org/u/y.abdoush)
#### Post date: [October 21, 2019, 9:39am UTC](https://discourse.paraview.org/t/getting-uniformly-distributed-points/2796/15 "2019-10-21T09:39:10Z")

</div>

I see. Thank you very much Mathieu!
