← Back to team overview

yade-users team mailing list archive

Re: hello? -help with a spinning bucket!

 

Hi Michel,

if your bucket is rigid, then you could clump its components together,
at which point it could be rotated as a single body by the current
RotationEngine. You would only had to add one flag so that rotations on
a body (on the clump) would be applied relative to its current
orientation rather than in the global frame. Then displacing/rotating
the clump would also automatically update your rotation.

Otherwise, you could place 2 dummy bodies (with zero mass, no shape etc;
they would not participate in the simulation otherwise) of which
positions would determine the axis of rotation; an extra engine
(deriving from RotationEngine; it would be only a few lines of code) so
that the axis of rotation would be defined in terms of those bodies. You
would be free to move those two to your liking during the simulation
then.

You can have a look at e.g. InterpolatingSpiralEngine or
InterpolatingDirectedForceEngine; they essentially only modify
parameters of their respective parent engines before calling them, so
there is no code duplication and their code is really short.

Let us know what you prefer and if you need some help. If you add that,
please add yourself as a member of yade-dev team and work on the trunk
code so that it can be commited back. Everybody will benefit from your
work, that is what makes the project alive.

Cheers, Václav






Follow ups

References