← Back to team overview

yade-users team mailing list archive

[Question #692057]: The meaning of O.bodies.state.ori/refOri

 

New question #692057 on Yade:
https://answers.launchpad.net/yade/+question/692057

Hi,

When I was trying to calculate the rotation angle of spheres, I found the following state parameters may be useful, but I didn't fully understand the meaning of each parameter. 
For example, for one typical sphere, I got:

1.O.bodies[i].state.ori
#get current orientation
I got: Quaternion((-0.8571073592023137,0.483498130637521,-0.17775413489215533),2.167483435911097), this quaternion is composed of a unit vector and a value, how to use the vector and the value to represent the orientation?

2.O.bodies[i].state.refOri
# get reference orientation
I got: Quaternion((1,0,0),0) 
How yade define the refOri for a particle? I suppose refOri will not change, am I right?
 
3.O.bodies[i].state.rot()
#Rotation from reference orientation (as rotation vector)
I got: Vector3(-1.8577660038685175,1.0479741894508063,-0.3852791430434534)
How can I use this vector to calculate the rotation angle? Is this vector related to ori and refOri?

4.O.bodies[i].state.refPos
I got: Vector3(0.06797544633577166,0.012988671946374571,0.03281123240261211)
Can the displacement of the sphere be calculated by O.state.pos-O.state.refPos?

Thanks in advance
Have a good weekend
Leonard
https://yade-dem.org/doc/yade.wrapper.html?highlight=state%20ori#yade.wrapper.State.ori

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