# Create voronoi (delauny) cells from coordinates, indices and normals data

**URL:** https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659
**Category:** ParaView Support
**Created:** [July 21, 2021, 12:56pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659 "2021-07-21T12:56:34Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [July 21, 2021, 12:56pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/1 "2021-07-21T12:56:34Z")

</div>

Voronoi3D tessellation is very expensive for high-resolution data. What I have are dumps from my simulation where cell quantities are defined and the cells are made from 3D Voronoi tessellation. Along with this, I have the data of the face vertex coordinates of the cells and their respective normals and indices. Is it possible to create a generate a Voronoi3D tessellation from this data without the expensive computational overhead in Paraview for visualization?

---

<div class="post-metadata">

### Author: ![deepakpawar2310](https://discourse.paraview.org/user_avatar/discourse.paraview.org/deepakpawar2310/32/4602_2.png) [@deepakpawar2310](https://discourse.paraview.org/u/deepakpawar2310)
#### Post date: [May 31, 2023, 9:20am UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/2 "2023-05-31T09:20:23Z")

</div>

HI

DO YOU HAVE ANY LEADS ON VISUALIZING THE VORONOI CELL IN PARAVIEW?

Any help will be appreciated!

THANKS

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 6:10am UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/3 "2024-01-10T06:10:10Z")

</div>

No! But SPH representation gives me an approximate visualization which turned out to be good enough for the Arepo code I was working on.

---

<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: [January 10, 2024, 12:43pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/4 "2024-01-10T12:43:20Z")

</div>

I don’t think there is a way to explicitly create the Voronoi cell tessellation in ParaView. But depending on what you are intending to do with it, you might be able to get away with a sampled Voronoi cell tessellation. This is easily produced with the `Point Volume Interpolator` filter. This filter takes points from a dataset, treats them like a point cloud, and interpolates them on a regular grid defined in space. One of the interpolating kernels is a `Voronoi Kernel`, so you can use the resulting grid to query values and approximate the Voronoi tessellation.

 ![Screen Shot 2024-01-10 at 7.38.03 AM](https://discourse.paraview.org/uploads/default/original/2X/c/c0c6694ca59bb1b069664d34462ee7f1a2f3209e.jpeg)

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 1:06pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/5 "2024-01-10T13:06:37Z")

</div>

This is good. But somehow this doesn’t work very well for my data, which has at least 400,000 points and flashes warnings. SPH on the other hand gives values which make sense.

---

<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: [January 10, 2024, 1:11pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/6 "2024-01-10T13:11:32Z")

</div>

That’s true. I’m not sure why you are getting warnings, but the volume interpolator is only as good as the resolution you set the grid to. With 400,000 points you would probably need to crank the resolution up to an unreasonable size to capture the shape of the cells with any accuracy.

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 1:39pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/7 "2024-01-10T13:39:11Z")

</div>

Here are my data files and the ParaView state. Please let me know if you can reproduce the warnings and perhaps fix this. I am using a `programmable source` to read the data, where you need to change the location to point to the data file I am attaching after loading the state.

> **[halo-prop\_ID=110-clipped.hdf5](https://drive.google.com/file/d/1I1Vw1BZqxGNa8RMEjh_sI8UOt7boMlbi/view?usp=sharing)**
>
> Google Drive file.

[halo-prop-nMgII\_ID=110-clipped.npy|attachment](https://discourse.paraview.org/uploads/short-url/Ab98P01fZbdRb5ArkycjQnWfLiS.npy) (1.7 MB)  
[paraview11.pvsm](https://discourse.paraview.org/uploads/short-url/2gvZobPv6qb0slIifrnxgjS1WuP.pvsm) (581.5 KB)

---

<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: [January 10, 2024, 1:53pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/8 "2024-01-10T13:53:16Z")

</div>

I can’t seem to replicate your warnings (in ParaView 3.12.0-RC1). Once I update your state to point to my directory, I get no warnings.

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 2:02pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/9 "2024-01-10T14:02:24Z")

</div>

The Voronoi filter with Point Volume interpolator works fine for you?

---

<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: [January 10, 2024, 4:28pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/10 "2024-01-10T16:28:53Z")

</div>

Seems to work OK. I got some warnings when I tried to do volume rendering due to the way the rendering properties were set up, but adding the `Point Volume Interpolator` to the output of your `Programmable Source` seemed to work just fine.

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 4:59pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/11 "2024-01-10T16:59:11Z")

</div>

`Point Volume Interpolator` with volume rendering is exactly what was giving me the warning as well. Also, the slice plots after the `Point Volume Interpolator` give results with values and features that don’t make much sense and, intuitively, seem incorrect by just looking at the point data.

---

<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: [January 10, 2024, 6:44pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/12 "2024-01-10T18:44:40Z")

</div>

Like I said, I don’t think the warning has anything to do with the `Point Volume Interpolator`. It’s a problem with the precision of the rendering, as discussed here: [cannot use log scale due to opengl texture problem](https://discourse.paraview.org/t/cannot-use-log-scale-due-to-opengl-texture-problem/848)

About the results not making sense, I don’t know enough about your work to know about that. I still suspect it is a precision problem. The two data sets look reasonably close given the coarseness of the grid.

 ![Screen Shot 2024-01-10 at 1.28.29 PM](https://discourse.paraview.org/uploads/default/original/2X/f/f7fdceaa9a68b6db940f8193d201a3d19b5e3554.jpeg)

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 6:51pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/13 "2024-01-10T18:51:08Z")

</div>

Can you please share this state? I get a blank box in `Point Volume Interpolator`.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/9/90f5b348109e93b9576ab6992675f3e25570c791.jpeg)

---

<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: [January 10, 2024, 6:55pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/14 "2024-01-10T18:55:44Z")

</div>

[point-volume-interp.pvsm](https://discourse.paraview.org/uploads/short-url/9t64egDjh3u93rfZ0Ye8y1lcVE7.pvsm) (791.5 KB)

---

<div class="post-metadata">

### Author: ![dutta-alankar](https://discourse.paraview.org/user_avatar/discourse.paraview.org/dutta-alankar/32/13310_2.png) [@dutta-alankar](https://discourse.paraview.org/u/dutta-alankar)
#### Post date: [January 10, 2024, 7:21pm UTC](https://discourse.paraview.org/t/create-voronoi-delauny-cells-from-coordinates-indices-and-normals-data/7659/15 "2024-01-10T19:21:13Z")

</div>

@Kenneth_Moreland Thanks a lot! I was making a surface representation which was causing this.
