What is the output format obtained from the Pyvoro code also how to visualize this voronoi tesselation in 3D?

69 views Asked by At

I am trying to use the Pyvoro package from pyvoro. It works for 3D. But I am unable to decipher the output it produces. Can you tell me how to recover the polyhedrons from this output? And what exactly do these adjacency means?

I tried to extract the output one by one. I am using visual studio. May be this also could be done more efficiently. But I was unable to view polyhedrons which is what I was expecting as the output. Also please tell me how do you visualize this voronoi tesselation in 3D.

import pyvoro
cells=pyvoro.compute_voronoi(
  [[1.0, 2.0, 3.0], [4.0, 5.5, 6.0]], # point positions
  [[0.0, 10.0], [0.0, 10.0], [0.0, 10.0]], # limits
  2.0, # block size
  radii=[1.3, 1.4] # particle radii -- optional, and keyword-compatible arg.
)
print(cells)
# print(cells[0])

for item in cells:
    vertices = item['vertices']
    for vertex in vertices:
        print(vertex)
        
for item in cells:
    adjacency = item['adjacency']
    for adj in adjacency:
        print(adj)
        
for item in cells:
    faces = item['faces']
    for f in faces:
        print(f)
0

There are 0 answers