← Back to team overview

yade-users team mailing list archive

Re: [Question #705414]: Accessing Quaternions' Components


Question #705414 on Yade changed:

Utku posted a new comment:
Hello again.

I just figured out how to access the Quaternions' components. First, you
need to change Quaternion to tuple using the toAngleAxis() method. For
example, suppose we again have the same Quaternion that I used in my

q =

Let us use toAngleAxis method and assign it to a different variable
name, say t.

t = q.toAngleAxis()

Then, t will become

One can easily access the components now. t[0][0], t[0][1], t[0][2] are
the i,j,k values of the quaternion, and t[1] is the angle.

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