5
$\begingroup$

I would like to determine Euler angles according to the following example.

My example:

I have the three vectors in an original set of axes:

r1e = {-0.517853, 0., -0.759239}
r2e = {-0.517853, 0., 0.759239}
r3e = {0.0647316, 0., 0.}

And after expressing them in a new reference frame they obtain the following components:

rt1e={0.310733, -0.358839, -0.786917}
rt2e={0.690333, 0.298661, 0.527983}
rt3e={-0.0625667, 0.00376111, 0.0161833}

In reality, I know the Euler angles to be $(30,60,120)$ degrees. How can I get Mathetmatica to give me this?

$\endgroup$
10
  • $\begingroup$ Have you tried EulerAngles? $\endgroup$ Commented Jan 6, 2019 at 18:09
  • $\begingroup$ That command won't work, as the rotation matrix itself is not known. Only the two vectors. $\endgroup$ Commented Jan 6, 2019 at 18:10
  • 1
    $\begingroup$ In general, a rotation matrix is not uniquely defined by the action on a single vector... $\endgroup$ Commented Jan 6, 2019 at 18:12
  • 1
    $\begingroup$ What I tried to say: If you prescribe a pair $u$ and $v$ of same length $\neq 0$ in $\mathbb{R}^3$, then there will be a one-parameter family of rotations (and thus a one-parameter family of Euler angles) that map $u$ to $v$. So, it is as it is: Your problem is underdetermined. $\endgroup$ Commented Jan 6, 2019 at 18:18
  • 1
    $\begingroup$ "I actually have 3 vectors" - by this, do you mean the three vectors before and after being transformed by some rotation matrix? If so, please look at FindGeometricTransform[], which can be used with EulerAngles[]. $\endgroup$ Commented Jan 6, 2019 at 18:29

1 Answer 1

11
$\begingroup$

As noted, you can use FindGeometricTransform[] in tandem with EulerAngles[]:

r = {{-0.517853, 0., -0.759239}, {-0.517853, 0., 0.759239}, {0.0647316, 0., 0.}};
rt = {{0.310733, -0.358839, -0.786917}, {0.690333, 0.298661, 0.527983},
      {-0.0625667, 0.00376111, 0.0161833}};

fg = FindGeometricTransform[r, rt];

EulerAngles[Drop[TransformationMatrix[Last[fg]], -1, -1]]/°
   {60.0048, 30.0019, 120.}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.