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

    Status: Answered => Open

lip is still having a problem:
dear Jan:
       thanks for your answer. i noticed that  the code below might solve my 
problem:
       if(b->isAspherical()){
                        Matrix3r T(state->ori);
                        // the tensorial expression 
http://en.wikipedia.org/wiki/Moment_of_inertia#Moment_of_inertia_tensor
                        // inertia tensor rotation from 
http://www.kwon3d.com/theory/moi/triten.html
                        Matrix3r mI; mI<<state->inertia[0],0,0, 
0,state->inertia[1],0, 0,0,state->inertia[2];
                        
//E+=.5*state->angVel.transpose().dot((T.transpose()*mI*T)*state->angVel);
                        
E+=.5*angVel.transpose().dot((T*mI*T.transpose())*angVel);
                }

    but i still have a problem, i think the code 'Matrix3r
T(state->ori)' is used to conver quaternionr into a rotating matrix,if
so, how can i achieve that by python? can you give me some advice?

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to