← Back to team overview

yade-users team mailing list archive

Re: [Question #688763]: ossillation_rotation

 

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

    Status: Open => Needs information

Jan Stránský requested more information:
Now when the if-elif structure is becoming meaningful, we can continue
:-)

with rotation there is a problem that the rotation vector representing the rotation from initial orientation just takes the two states, no history. So if you rotate and angle < pi, it is the rot().
However, if true rotation is > pi, the rot() represents "closest path" and becomes angle-pi and the rot().norm() is never greater than pi (you never comes to the else branch)
###
b = sphere((0,0,0),1)
for f in (0.1,0.5,0.9,1.1,1.5,1.9):
	b.state.ori = Quaternion((1,0,0),f*pi)
	print(f,b.state.rot(),b.state.rot().norm())
###

A solution is to store the rotation incrementally.

But before continuing, why do you have "for b in O.bodies" in
ossillation_rotation? Isn't the change of rotation dependent on one
specific body?

cheers
Jan

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