[q20+q21−q22−q232q1q2−2q0q32q1q3+2q0q22q1q2+2q0q3q20+q22−q21−q232q2q3−2q0q12q1q3−2q0q22q2q3+2q0q1q20+q23−q21−q22]
A quaternion is determined by two factors: normalized rotation axis (ax,ay,az) and rotation angle θ. q=cos(θ/2)+(axi+ayj+azk)sin(θ/2) and q−1=cos(θ/2)−(axi+ayj+azk)sin(θ/2). This means that ||q||=1.
The rotation matrix in term of (ax,ay,az) and θ is:
[1+(a2x−1)(1−cos(θ))−azsin(θ)+axay(1−cos(θ))aysin(θ)+axaz(1−cos(θ))azsin(θ)+axay(1−cos(θ))1+(a2y−1)(1−cos(θ))−axsin(θ)+ayaz(1−cos(θ))−aysin(θ)+axaz(1−cos(θ))axsin(θ)+ayaz(1−cos(θ))1+(a2z−1)(1−cos(θ))]
From the expression of quaternion, we have
cos(θ)=cos2(θ/2)−sin2(θ/2)=q20−(q21+q22+q23)
1−cos(θ)=1−cos2(θ/2)+sin2(θ/2)=2sin2(θ/2)
(ax,ay,az)=(q1,q2,q3)/sin(θ/2)
Based on these equations, we can derive the quaternion rotation matrix. For example,
1+(a2x−1)(1−cos(θ))=cos(θ)+a2x(1−cos(θ))=q20−(q21+q22+q23)+2q21=q20+q21−q22−q23
−azsin(θ)+axay(1−cos(θ))=−q3sin(θ/2)sin(θ)+q1q2sin2(θ/2)2sin2(θ/2)=2q1q2−2q0q3
A quaternion is determined by two factors: normalized rotation axis (ax,ay,az) and rotation angle θ. q=cos(θ/2)+(axi+ayj+azk)sin(θ/2) and q−1=cos(θ/2)−(axi+ayj+azk)sin(θ/2). This means that ||q||=1.
The rotation matrix in term of (ax,ay,az) and θ is:
[1+(a2x−1)(1−cos(θ))−azsin(θ)+axay(1−cos(θ))aysin(θ)+axaz(1−cos(θ))azsin(θ)+axay(1−cos(θ))1+(a2y−1)(1−cos(θ))−axsin(θ)+ayaz(1−cos(θ))−aysin(θ)+axaz(1−cos(θ))axsin(θ)+ayaz(1−cos(θ))1+(a2z−1)(1−cos(θ))]
From the expression of quaternion, we have
cos(θ)=cos2(θ/2)−sin2(θ/2)=q20−(q21+q22+q23)
1−cos(θ)=1−cos2(θ/2)+sin2(θ/2)=2sin2(θ/2)
(ax,ay,az)=(q1,q2,q3)/sin(θ/2)
Based on these equations, we can derive the quaternion rotation matrix. For example,
1+(a2x−1)(1−cos(θ))=cos(θ)+a2x(1−cos(θ))=q20−(q21+q22+q23)+2q21=q20+q21−q22−q23
−azsin(θ)+axay(1−cos(θ))=−q3sin(θ/2)sin(θ)+q1q2sin2(θ/2)2sin2(θ/2)=2q1q2−2q0q3
No comments:
Post a Comment