← Back to team overview

yade-users team mailing list archive

Re: [Question #695164]: Interparticle spacing


Question #695164 on Yade changed:

    Status: Open => Answered

Jan Stránský proposed the following answer:
> I couldn't find a function that can give the positions of the Delaunay
tetrahedrons corners

position of Delaunay tetrahedron corners are centers of particles

> Voronoi cells are not the same as the Delaunay tetrahedron (right?)

right, they are dual to each other [4]

A MWE using scipy.spatial.Delaunay [5]:
from scipy.spatial import Delaunay
from yade import pack
sp = pack.SpherePack()
pts = [b.state.pos for b in O.bodies]
t = Delaunay(pts)
for i1,i2,i3,i4 in t.simplices:
    for j1,j2 in ((i1,i2),(i1,i3),(i1,i4),(i2,i3),(i2,i4),(i3,i4)):
        p1,p2 = pts[j1],pts[j2]
# TODO: remove duplicites?
# TODO: consider radius of particles?


[4] https://en.wikipedia.org/wiki/Delaunay_triangulation#Relationship_with_the_Voronoi_diagram
[5] https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.Delaunay.html

You received this question notification because your team yade-users is
an answer contact for Yade.