← Back to team overview

yade-users team mailing list archive

animation generation

 

I found that the build-in Simulation Player works with
the
positionorientation files which are generated by
default
if one takes care of a couple of things:

1) The config file needs to be the initial xml file
for the
recorded simulation.

2) The paddle should be 1 (or 0) for the following
file renaming approach.
And the basename needs to include the "_".

3) By default every 50th iteration is saved, so there
are files named
positionorientation_0, positionorientation_50,
positionorientation_100 ...

Those need to be renamed to be ending in consecutive
numbers:
positionorientation_0, positionorientation_1,
positionorientation_2 ...

one could do the renaming with bash:
for a in `seq 0 111`; do mv
positionorientation_$(($a*50)) po_$a; done

4) The source code tells you that the Simulation
Player expects in the first line the total number of
lines (bodies) in the positionorientation file. So one
needs to add this, eg by:

for a in `seq 0 111`; do wc po_$a|awk '{print $1}' >
ps_$a; cat po_$a >> ps_$a; done

5) save snapshots works. The generated files are in
bmp format (but have no extension), according to the
source.

If you have imagemagick you can just use "animate" to
play the bmp files as an animation.


_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
http://lists.berlios.de/mailman/listinfo/yade-users



Follow ups