Углы Эйлера

Пример кода, выполняющего отображение тела после поворота, заданного углами Эйлера.

Используемые функции: RotationMatix, Line, Cylinder, Arrow, ParametricPlot3D, Module.

Manipulate[
Module[{aa, v1 = {0, 0, 1}, v2, v3, A1, A2, A3, A12, A123},
  A1 = RotationMatrix[\[Psi], v1];
  v2 = A1.{1, 0, 0};
  A2 = RotationMatrix[\[Theta], v2];
  A12 = A2.A1;
  v3 = A12.{0, 0, 1};
  A3 = RotationMatrix[\[CurlyPhi], v3];
  A123 = A3.A12;
  Show[
   Graphics3D[
    {
     (* Тело *)    
     Directive[RGBColor[0.9, 0.9, 0.8], Opacity[0.9]],
     Cylinder[{A123.{0, 0, -0.5}, A123.{0, 0, 0.5}}, 0.6],
     Cylinder[{A123.{0.6, 0, -0.5}, A123.{0.6, 0, -0.4}}, 0.1],
     Cylinder[{A123.{-0.6, 0, -0.5}, A123.{-0.6, 0, -0.4}}, 0.1],
     (* Промежуточные и исходные оси *)
     Directive[Opacity[1]],
     Gray, Thickness[0.002],
     Line[{{0, 0, 0}, {1, 0, 0}}],
     Line[{{0, 0, 0}, {0, 1, 0}}],
     Line[{{0, 0, 0}, A1.{0, 1, 0}}],
     Line[{{0, 0, 0}, A1.{0, 0, 1}}],
     Line[{{0, 0, 0}, A12.{1, 0, 0}}],
     Line[{{0, 0, 0}, A12.{0, 1, 0}}],
     (* Оси *)
     Red, Thickness[0.005],
     Arrow[{{0, 0, 0}, A123.{1, 0, 0}}],
     Green, Thickness[0.005],
     Arrow[{{0, 0, 0}, A123.{0, 1, 0}}],
     Blue, Thickness[0.005],
     Arrow[{{0, 0, 0}, A123.{0, 0, 1}}],
     (* Подписи углов Эйлера *)
    
     Text[Style[
       If[\[Psi] > 0.01,
        "\[Psi]=" <> ToString[Round[\[Psi]/\[Degree]]] <> "\[Degree]",
         ""], 16, Red], ({Cos[\[Psi]*0.5], Sin[\[Psi]*0.5], 0.1})*1.1],
     Text[
      Style[If[\[Theta] > 0.01,
        "\[Theta]=" <> ToString[Round[\[Theta]/\[Degree]]] <>
         "\[Degree]", ""], 16, Green],
      A1.{0.1, Cos[\[Theta]*0.5], Sin[\[Theta]*0.5]}*1.1],
     Text[
      Style[If[\[CurlyPhi] > 0.01,
        "\[CurlyPhi]=" <> ToString[Round[\[CurlyPhi]/\[Degree]]] <>
         "\[Degree]", ""], 16, Blue],
      A12.{Cos[\[CurlyPhi]*0.5], Sin[\[CurlyPhi]*0.5], 0.1}*1.1]
     },
    ViewVector -> {{4.5, 6, 4}, {0, 0, 0}}
    ],
   (* Дуги углов Эйлера *)
  
   ParametricPlot3D[{{Cos[aa], Sin[aa], 0}, {Cos[aa + \[Pi]/2],
      Sin[aa + \[Pi]/2], 0}}, {aa, -0.0001, \[Psi]}, PlotStyle -> Red],
   ParametricPlot3D[{A1.{0, Cos[aa], Sin[aa]},
     A1.{0, Cos[aa + \[Pi]/2],
       Sin[aa + \[Pi]/2]}}, {aa, -0.0001, \[Theta]},
    PlotStyle -> Green],
   ParametricPlot3D[{A12.{Cos[aa], Sin[aa], 0},
     A12.{Cos[aa + \[Pi]/2], Sin[aa + \[Pi]/2],
       0}}, {aa, -0.0001, \[CurlyPhi]}, PlotStyle -> Blue],
   (* *)
   PlotRange -> {{-1.2, 1.2}, {-1.2, 1.2}, {-1.2, 1.2}},
   ImageSize -> 500
   ]
  ], {\[Psi], 0, \[Pi], 0.1}, {\[Theta], 0, \[Pi], 0.1}, {\[CurlyPhi],
   0, \[Pi], 0.1}]