← Back to team overview

yade-users team mailing list archive

Re: [Question #700830]: Is there any way to generate voronoi tessellation diagram?

 

Question #700830 on Yade changed:
https://answers.launchpad.net/yade/+question/700830

    Status: Open => Answered

Bruno Chareyre proposed the following answer:
FlowEngine has more features to visit the graph.

Something like this should work (not tested but the needed functions are
there):

for k in range(f.nCells): #where "f" is FlowEngine
    point1 = f.getCellCenter(k)
    others = f.getNeighbors(k)
     for j in others:
        if i<j: continue # this is to not print every branch twice
        point2 = f.getCellCenter(j )
        print( "voronoi branch from ", point1,"to",point2)
 
Bruno

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