Wolfram Language

Géométrie de calcul

Rotations d'Euler

La version 11 introduit EulerMatrix pour décrire une séquence de rotations par rapport à un cadre mobile de coordonnées.

Modélisez un cardan. Chaque angle d'Euler est l'angle de rotation relatif de chaque axe.

Afficher l'entrée complète de Wolfram Language
In[1]:=
Click for copyable input
ring3 = {Red, CapForm -> None, Tube[{{-.1, 0, 0}, {.1, 0, 0}}, 3], Line[{{{0, 0, 4}, {0, 0, 3}}, -{{0, 0, 4}, {0, 0, 3}}}]}; ring2 = {Blue, CapForm -> None, Tube[{{-.1, 0, 0}, {.1, 0, 0}}, 2], Line[{{{0, 3, 0}, {0, 2, 0}}, -{{0, 3, 0}, {0, 2, 0}}}]}; ring1 = {Green, CapForm -> None, Tube[{{-.1, 0, 0}, {.1, 0, 0}}, 1], Black, Arrow[{{-1, 0, 0}, {1, 0, 0}}], Line[{{{0, 0, 1}, {0, 0, 2}}, -{{0, 0, 1}, {0, 0, 2}}}]};
In[2]:=
Click for copyable input
gimbal[{\[Alpha]_, \[Beta]_, \[Gamma]_}] := Graphics3D[{GeometricTransformation[ring3, EulerMatrix[{\[Alpha], 0, 0}]], GeometricTransformation[ring2, EulerMatrix[{\[Alpha], \[Beta], 0}]], GeometricTransformation[ring1, EulerMatrix[{\[Alpha], \[Beta], \[Gamma]}]]}, ViewPoint -> {1.3, -2.4, 2.}, PlotRange -> 3.5, ImageSize -> Medium];
In[3]:=
Click for copyable input
gimbalframes = Table[gimbal[{i, i, i}], {i, 0, 2 Pi, Pi/32}];
In[4]:=
Click for copyable input
Manipulate[ gimbalframes[[i]], {{i, 1, "time"}, 1, Length[gimbalframes], 1}, SaveDefinitions -> True]
Out[4]=
Jouer l'animation
Arrêter l'annimation

Exemples connexes

de en es ja ko pt-br ru zh