Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Here in X-convention

Extrinsic

RotationMatrix3DExtrinsic[\[Phi]_,\[Theta]_,\[Psi]_]:=RotationMatrix[\[Pi]-\[Psi],{0,0,1}].RotationMatrix[\[Theta],{1,0,0}].RotationMatrix[\[Pi]-\[Phi],{0,0,1}]

Intrinsic

RotationMatrix3DIntrinsic[\[Phi]_,\[Theta]_,\[Psi]_]:=RotationMatrix[\[Pi]-\[Phi],RotationMatrix[\[Theta],RotationMatrix[\[Pi]-\[Psi],{0,0,1}].{1,0,0}].{0,0,1}].RotationMatrix[\[Theta],RotationMatrix[\[Pi]-\[Psi],{0,0,1}].{1,0,0}].RotationMatrix[\[Pi]-\[Psi],{0,0,1}]

In Numeric values, they got the same results.

RotationMatrix3DExtrinsic[\[Pi]/3, \[Pi]/4, \[Pi]/5]//N
RotationMatrix3DIntrinsic[\[Pi]/3,\[Pi]/4,\[Pi]/5]//N

enter image description here

But RotationMatrix3DIntrinsic does not work well in symbolic value, alpha,beta,gamma. After a long time calculation, I see some complex result with Conjugate Abs... So how to develop it.


result=RotationMatrix3DIntrinsic[a,b,c];
t=Assuming[Element[{a,b,c},Reals],result];

failed.

t=Assuming[Element[{a,b,c},Reals]&&0<a<\[Pi]/2&&0<b<\[Pi]/2&&0<c<\[Pi]/2,result//Simplify];

failed.

t=Simplify[result,Element[{a,b,c},Reals]&&0<a<\[Pi]/2&&0<b<\[Pi]/2&&0<c<\[Pi]/2];

failed.


There are a lot Abs, Trig functions


  • Simpler case two angle

the result show that we should add suitable range of angles, however it cost too much time. enter image description here


a solution: how to speed up?

IntrinsicRotation3D[\[Phi]_,\[Theta]_,\[Psi]_]:=Module[{},

rot1=FullSimplify[RotationMatrix[\[Phi],axisZ={0,0,1}],\[Psi]\[Element]Reals&&0<\[Phi]<\[Pi]/2];

rot2=FullSimplify[RotationMatrix[\[Theta],axisX=rot1.{1,0,0}],Element[{\[Theta],\[Phi]},Reals]&&0<\[Theta]<\[Pi]/2&&0<\[Phi]<\[Pi]/2];

rot3=FullSimplify[RotationMatrix[\[Psi],axisZNew=rot2.axisZ],Element[{\[Theta],\[Psi],\[Phi]},Reals]&&0<\[Theta]<\[Pi]/2&&0<\[Psi]<\[Pi]/2&&0<\[Phi]<\[Pi]/2];

result=rot3.rot2.rot1//FullSimplify]
share|improve this question
    
By default, Mathematica assumes your angles are complex. You thus need to use assumptions; look up the second argument of Simplify[], or look up Assuming[]. –  J. M. May 11 '13 at 3:07
    
@J.M. ok, Let me try that, does any simpler way to Obtain the matrix just like Extrinsic way? –  HyperGroups May 11 '13 at 3:09
4  
My eyes ! ..... –  belisarius May 11 '13 at 3:16
    
@bel, your eyes are sensitive to pink? –  J. M. May 11 '13 at 3:19
2  
@J.M. en.wikipedia.org/wiki/Casa_Rosada –  belisarius May 11 '13 at 3:34

1 Answer 1

up vote 1 down vote accepted
rot1 = RotationMatrix[ϕ, axisZ = {0, 0, 1}];
rot2 = Simplify@ComplexExpand[RotationMatrix[θ, axisX = rot1.{1, 0, 0}], TargetFunctions -> {Re, Im}];
rot3 = Simplify@TrigFactor@ComplexExpand[RotationMatrix[ψ, rot2.axisZ], TargetFunctions -> {Re, Im}];
rot3.rot2.rot1 // Simplify

(* {{Cos[ϕ] Cos[ψ] - 
   Cos[θ] Sin[ϕ] Sin[ψ], -Cos[θ] Cos[ψ] \
Sin[ϕ] - Cos[ϕ] Sin[ψ], 
 Sin[θ] Sin[ϕ]}, {Cos[ψ] Sin[ϕ] + 
Cos[θ] Cos[ϕ] Sin[ψ], 
Cos[θ] Cos[ϕ] Cos[ψ] - 
Sin[ϕ] Sin[ψ], -Cos[ϕ] Sin[θ]}, \
{Sin[θ] Sin[ψ], Cos[ψ] Sin[θ], Cos[θ]}}
*)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.