For example, you can e.g. generate a Fick-matrix, with
R_Fick = R3_s() * R2_s() * R1_s()
Routines for working with rotation matrices
Rotation about the 1-axis. The argument is entered in degree.
Parameters: | psi : rotation angle about the 1-axis [deg] |
---|---|
Returns: | R1 : rotation matrix, for rotation about the 1-axis |
Symbolic rotation matrix about the 1-axis, by an angle psi
You can e.g. generate a Fick-matrix, with R_Fick = R3_s() * R2_s() * R1_s()
Rotation about the 2-axis. The argument is entered in degree.
Parameters: | phi : rotation angle about the 1-axis [deg] |
---|---|
Returns: | R2 : rotation matrix, for rotation about the 2-axis |
Symbolic rotation matrix about the 2-axis, by an angle phi
You can e.g. generate a Fick-matrix, with R_Fick = R3_s() * R2_s() * R1_s()
Rotation about the 3-axis. The argument is entered in degree.
Parameters: | theta : rotation angle about the 1-axis [deg] |
---|---|
Returns: | R3 : rotation matrix, for rotation about the 3-axis |
Symbolic rotation matrix about the 3-axis, by an angle theta
You can e.g. generate a Fick-matrix, with R_Fick = R3_s() * R2_s() * R1_s()
This function takes a rotation matrix, and calculates the corresponding Fick-angles.
Parameters: | R : rotation matrix |
---|---|
Returns: | psi : torsional position (rotation about 1-axis) phi : vertical position (rotation about 2-axis) theta : horizontal position (rotation about 3-axis) |
Notes
The following formulas are used:
phi = -asin(R31); theta = asin(R21/cos(phi)); psi = asin(R32/cos(phi));
R_31 = n(1)*n(3) - n(2)*sin(rho) - n(1)*n(3)*cos(rho); R_21 = n(1)*n(2) + n(3)*sin(rho) - n(1)*n(2)*cos(rho); R_32 = n(2)*n(3) + n(1)*sin(rho) - n(2)*n(3)*cos(rho);
Note that it is assumed that psi < pi;
This function takes a rotation matrix, and calculates the corresponding Helmholtz-angles.
Parameters: | R : rotation matrix |
---|---|
Returns: | psi : torsional position (rotation about 1-axis) phi : vertical position (rotation about 2-axis) theta : horizontal position (rotation about 3-axis) |
Notes
The following forulas are used:
theta = asin(R21); phi = -asin(R31/cos(theta)); psi = -asin(R23/cos(theta));
R_21 = n(1)*n(2) + n(3)*sin(rho) - n(1)*n(2)*cos(rho); R_31 = n(1)*n(3) - n(2)*sin(rho) - n(1)*n(3)*cos(rho); R_23 = n(2)*n(3) - n(1)*sin(rho) - n(2)*n(3)*cos(rho);
Note that it is assumed that psi < pi;