orientation matrix #473
-
I notice some discrepancy between the orientation matrix I get from an Orientation object by MTEX and that I calculate by equation in textbooks (please see below the function I wrote based on the equations). For example, % using MTEX
ori = orientation.goss;
gmatrix = ori.matrix;
gmatrix =
1.0000 -0.0000 0.0000
0.0000 0.7071 -0.7071
0.0000 0.7071 0.7071.
% Using the function below euler2matrix
eul = ori.Euler;
euld = eul/degree;
gmatrix = euler2matrix(euld(1),euld(2),euld(3));
gmatrix =
1.0000 0 0
0 0.7071 0.7071
0 -0.7071 0.7071
**Could you please help check which one is correct? Thank you. ** function f = euler2matrix(varphi1d,Phid,phi2d)
% Convert three eular angles to a grain orientation matrix
varphi1 = deg2rad(varphi1d);
Phi = deg2rad(Phid);
varphi2 = deg2rad(phi2d);
g11 = cos(varphi1) .* cos(varphi2) - sin(varphi1) .* sin(varphi2) .* cos(Phi);
g12 = sin(varphi1) .* cos(varphi2) + cos(varphi1) .* sin(varphi2) .* cos(Phi);
g13 = sin(varphi2) .* sin(Phi);
g21 = -cos(varphi1) .* sin(varphi2) - sin(varphi1) .* cos(varphi2) .* cos(Phi);
g22 = -sin(varphi1) .* sin(varphi2) + cos(varphi1) .* cos(varphi2) .* cos(Phi);
g23 = cos(varphi2) .* sin(Phi);
g31 = sin(varphi1) .* sin(Phi);
g32 = -cos(varphi1) .* sin(Phi);
g33 = cos(Phi);
f(1,1,:) = g11;
f(1,2,:) = g12;
f(1,3,:) = g13;
f(2,1,:) = g21;
f(2,2,:) = g22;
f(2,3,:) = g23;
f(3,1,:) = g31;
f(3,2,:) = g32;
f(3,3,:) = g33;
end |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I hope this documentation page helps you to understand the issue https://mtex-toolbox.github.io/MTEXvsBungeConvention.html Ralf. |
Beta Was this translation helpful? Give feedback.
-
I see. Many thanks. |
Beta Was this translation helpful? Give feedback.
I hope this documentation page helps you to understand the issue
https://mtex-toolbox.github.io/MTEXvsBungeConvention.html
Ralf.