D3PLOT 22.1

ROTATE

ROTATE

Rotate model by angles [Tx,Ty,Tz] about centre of rotation [Cx,Cy,Cz]

Define rotation angles, which are specified in degrees about the global X Y Z axes, and also the centre of rotation.

Rotation is applied to: ( [R] is the 3x3 rotation matrix, [R'] is its transpose, "New" and "Old" below are vectors or tensors as appropriate)

Coordinates New = [R] x [Old - centre] + centre
Velocity and acceleration vectors
Other vector data
(eg forces/moments ex binout file)
New = [R] x Old
Stress and strain tensors
Other tensor data
(eg ex binout file)
New = [R'] x Old x [R]

Compound rotations about more than one axis

If rotation angles about more than one axis have been specified they are applied in the order Tx, then Ty, then Tz; in other words [R] = [Rz].[Ry].[Rx] . If you need to apply compound rotations about more than one axis it is recommended that you check the outcome carefully to make sure that you have achieved what you intended.

If you already have a set of direction cosines and you want to know the angles required to reproduce these they can be computed as follows:

[Rx]: Rotation about the X axis:
Sx = Sin(theta X)
Cx
= Cos(theta X)

[Ry]: Rotation about the Y axis:
Sy = Sin(theta Y)
Cy = Cos(theta Y)

[Rz]: Rotation about the Z axis:
Sz = Sin(theta Z)
Cz = Cos(theta Z)
[
1
0
0
]
[
0
Cx
-Sx
]
[
0
Sx
Cx
]
[
Cy
0
Sy
]
[
0
1
0
]
[
-Sy
0
Cy
]
[
Cz
-Sz
0
]
[
Sz
Cz
0
]
[
0
0
1
]

Concatenating these together in the order [X, Y, Z], ie [Rz].[Ry].[Rx] gives the compound rotation matrix of cosines [Rc] :

[
Cy.Cz
Sx.Sy.Cz - Cx.Sz
Cx.Sy.Cz + Sz.Sz
]
[
Cy.Sz
Sx.Sy.Sz + Cx.Cz
Cx.Sy.Sz - Sx.Cz
]
[
-Sy
Sx.Cy
Cx.Cy
]

From which it can be seen that a set of Euler angles can be extracted as follows (using the notation < ij > is row < i >, column < j >)

Theta X = arctan(32/33) Since (Sx.Cy / Cx.Cy) = (Sx / Cx)
Theta Y = arcsin(-31)
Theta Z = arctan(21/11)
Since (Cy.Sz / Cy.Cz) = (Sz / Cz)

Therefore if you have 3x3 matrix [Rc] simply calculate the theta angles using the equations above, convert to degrees and apply as [Tx,Ty,Tz] to get the same effect in D3PLOT.