← Back to team overview

yade-users team mailing list archive

Re: [Question #681105]: particle position

 

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

    Status: Open => Answered

Robert Caulk proposed the following answer:
plot.AddData is used for plotting data. plot.SaveDataTxt is used for
saving the plot data to a text file. These features are not meant to be
used for plotting positions of all particles. If you really want to save
particle positions to a text file you need to do it using standard
python functionality:

f = open("positions.txt","w+")

for b in O.bodies:
    x,y,z = b.state.pos
    f.write("%d %d %d\n" % (x,y,z))

f.close()

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