Skip to content

Instantly share code, notes, and snippets.

@singularitti
Last active April 7, 2019 05:19
Show Gist options
  • Save singularitti/07e9cf8cb7e911957035f7cc6e4d0520 to your computer and use it in GitHub Desktop.
Save singularitti/07e9cf8cb7e911957035f7cc6e4d0520 to your computer and use it in GitHub Desktop.
Rotation by Euler angle #Mathematica #mechanics
Clear["Global`*"]
Rx[\[Phi]_] := MatrixExp[-I \[Phi] {{0, 0, 0}, {0, 0, -I}, {0, I, 0}}]
Ry[\[Phi]_] := MatrixExp[-I \[Phi] {{0, 0, I}, {0, 0, 0}, {-I, 0, 0}}]
Rz[\[Phi]_] := MatrixExp[-I \[Phi] {{0, -I, 0}, {I, 0, 0}, {0, 0, 0}}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment