1
$\begingroup$

I'm little bit confused. The Rotations are described by various means Direction Cosines Matrix (DCM); Euler Angles; Euler Axis/Angle; Quaternion.

What is the difference between them. How I can convert the orientation from one representation to another.

My question here: I have a the orientation of an object in terms of direction cosine vector. See the following figure; direction cosine - unit vector

Note that the vector r makes angle alpha with x-axis, beta with y-axis and gamma with z-axis.

I want to represent this orientation in tearms of Quaternion. Is that possible? if yes, How we can represent this angles in terms of Quaternion (Axis,Angle,Matrix).

Thanks for the Help!.

$\endgroup$
3

1 Answer 1

0
$\begingroup$

The wiki article provides all the conversions you could ask for. Specifically you may want this section.

The formalism (or system) you eventually choose depends on your application. In theory, using any or all of those systems is possible.

Rather than rehashing all of that stuff here, you might want to spend time to pick out the one that sounds right to you, and then ask some targeted question about it.


Update: The request was clarified to changing from a direction cosine to a quaternion. The quaternion needs two pieces of data: the components of the unit vector $u$ on the axis of rotation, and the angle of rotation $\theta$ (measured in a right-hand manner in the plane normal to $u$.)

The three angles in your picture will give you $u$, and I assume you want to specify $\theta$ later. Finding the components of the vector in the picture is easy: the projections onto the axes are just $\cos(\alpha)$, $\cos(\beta)$, and $\cos(\gamma)$, so $u=i\cos(\alpha)+j\cos(\beta)+k\cos(\gamma)$.

In the scheme of quaternion rotations, the matching quaternion is $q=\cos(\theta/2)+u\sin(\theta/2)$.

$\endgroup$
6
  • $\begingroup$ I've been trying to solve a problem. I'm surprised I haven't been able to find anything really useful on the net so far. my question simply; how it possible to convert the Direction Vector to Quaternion (Axis,Angle,Matrix). I have a direction vector as shown in the figure; Fig.1 I want to generate Quaternion. $\endgroup$
    – user11819
    Feb 23, 2014 at 14:50
  • $\begingroup$ @user11819 I do not understand what you mean when you type (Axis, Angle, Matrix) next to quaternion. I can help you convert a direction cosine to a quaternion. Is that what you want? $\endgroup$
    – rschwieb
    Feb 23, 2014 at 21:08
  • $\begingroup$ Yes, this is what I'm looking for; Convert a direction cosine to a quaternion. the only information I have is the alpha,beta and gamma angles that the normal vector makes with the base axis: x-axis, y-axis and z-axis respectively. As given in this figure Fig.1. $\endgroup$
    – user11819
    Feb 24, 2014 at 11:02
  • $\begingroup$ @user11819 ok: I added an update for that. $\endgroup$
    – rschwieb
    Feb 24, 2014 at 13:33
  • $\begingroup$ Thank you very much for the answer. I just need to clarify something here. The angle of rotation θ could be calculated from the figure that I attached? or the information I have is not enough to calculate θ? Because I already knew that I need an axis and angle to find the Quaternion; but my problem is how to extract the axis (u) and the angle (θ) from the figure above!. you helped me to define the axis (u); but I'm still confused about calculating the angle (θ)! $\endgroup$
    – user11819
    Feb 24, 2014 at 13:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .