3
$\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$
  • $\begingroup$ Have you tried EulerAngles? $\endgroup$ – Henrik Schumacher Jan 6 at 18:09
  • $\begingroup$ That command won't work, as the rotation matrix itself is not known. Only the two vectors. $\endgroup$ – Spherical Cow Jan 6 at 18:10
  • 1
    $\begingroup$ In general, a rotation matrix is not uniquely defined by the action on a single vector... $\endgroup$ – Henrik Schumacher Jan 6 at 18:12
  • $\begingroup$ Fair enough, but in this case the problem has been constructed such that the three Euler angles are known to exist. The question specifically relates to why NSolve is not working. $\endgroup$ – Spherical Cow Jan 6 at 18:14
  • 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$ – Henrik Schumacher Jan 6 at 18:18
9
$\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, privacy policy and cookie policy

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