2
Needs@"SpinDynamica`"D ? AxesToEuler AxesToEuler@system1,system2,optsD gives the Euler angles 8a, b,g< by which each axis of system1 may be rotated in order to be brought into coincide with the corresponding axis of system2, i.e. eμ2=Rz2HaLRy2H bLRz2HgL.eμ1, where 8x,y,z<. The equivalent result is generated by eμ2=Rz1'HgLRy1'H bLRz1HaL.eμ1, where the primed axes of system1 follow the rotation. Each of system1 and system2 may have the form 8Z< or 8X,Z< or 8X,Y,Z<. Here Z,X and Y are 3-vectors. If only Z is specified, the two remaining axes are constructed. If X and Z is specified, the z-axis of the constructed system is equal to Z and the x-axis is in the XZ plane. If all three axes are specified, they must be a right-handed orthogonal set.If system2 is missing, the system 8ex,ey,ez< is assumed. generate a randomly oriented Axis system (specifying the z-axis) vecz = RandomReal@8- 1, 1<, 83<D 80.0542663, - 0.371543, - 0.426191< axes = AxisSystem@veczD 880.995426, 0.0627811, 0.0720152<, 80., - 0.75378, 0.657127<, 80.0955388, - 0.654121, - 0.750332<< derive the Euler angles relating the axis system to the original frame 8a, b, g< = AxesToEuler@axesD 81.46164, 2.41936, - 1.71583< 8a, b, g< ° 883.7459, 138.619, - 98.3097< rotate the axis system back to the original position Chop RotateEuler@axes, 8a, b, g<D 881., 0, 0<, 80, 1., 0<, 80, 0, 1.<< generate a randomly oriented Axis system (specifying two axes) vecx = RandomReal@8- 1, 1<, 83<D vecz = RandomReal@8- 1, 1<, 83<D 8- 0.66873, 0.962696, 0.490497< 80.67436, 0.659665, 0.101512< axes = AxisSystem@vecx, veczD 88- 0.677032, 0.634817, 0.372336<, 80.190952, - 0.337073, 0.921911<, 80.710749, 0.695261, 0.10699<<

derive the Euler angles relating the axis system to the

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: derive the Euler angles relating the axis system to the

Needs@"SpinDynamica`"D

? AxesToEuler

AxesToEuler@system1,system2,optsD gives the Euler angles 8a,b,g< by which each axis of system1 may be rotated in order to be

brought into coincide with the corresponding axis of system2, i.e. eµ2=Rz2HaLRy2HbLRz2HgL.eµ1, where mœ8x,y,z<.The equivalent result is generated by eµ2=Rz1'HgLRy1'HbLRz1HaL.eµ1, where the primed axes of system1 follow

the rotation. Each of system1 and system2 may have the form 8Z< or 8X,Z< or 8X,Y,Z<. Here Z,X and Y are

3-vectors. If only Z is specified, the two remaining axes are constructed. If X and Z is specified, the z-axis

of the constructed system is equal to Z and the x-axis is in the XZ plane. If all three axes are specified,

they must be a right-handed orthogonal set.If system2 is missing, the system 8ex,ey,ez< is assumed.

generate a randomly oriented Axis system (specifying the z-axis)

vecz = RandomReal@8−1, 1<, 83<D80.0542663, −0.371543, −0.426191<

axes = [email protected], 0.0627811, 0.0720152<,

80., −0.75378, 0.657127<, 80.0955388, −0.654121, −0.750332<<

derive the Euler angles relating the axis system to the original frame

8α, β, γ< = [email protected], 2.41936, −1.71583<

8α, β, γ< ê °

883.7459, 138.619, −98.3097<

rotate the axis system back to the original position

Chop@RotateEuler@axes, 8α, β, γ<D881., 0, 0<, 80, 1., 0<, 80, 0, 1.<<

generate a randomly oriented Axis system (specifying two axes)

vecx = RandomReal@8−1, 1<, 83<Dvecz = RandomReal@8−1, 1<, 83<D8−0.66873, 0.962696, 0.490497<

80.67436, 0.659665, 0.101512<

axes = AxisSystem@vecx, veczD88−0.677032, 0.634817, 0.372336<,

80.190952, −0.337073, 0.921911<, 80.710749, 0.695261, 0.10699<<

Page 2: derive the Euler angles relating the axis system to the

derive the Euler angles relating the axis system to the original frame

8α, β, γ< = [email protected], 1.4636, 2.36721<

8α, β, γ< ê °

868.0075, 83.8582, 135.631<

rotate the axis system back to the original position

Chop@RotateEuler@axes, 8α, β, γ<D881., 0, 0<, 80, 1., 0<, 80, 0, 1.<<

2 Euler.nb