一般位置下的3D齐次旋转矩阵
下面的矩阵虽然复杂,但它的逆矩阵求起来非常简单,只需要在 sin θ \sin\theta sinθ 前面加个负号就是原来矩阵的逆矩阵。
R ( x 0 , y 0 , z 0 , a , b , c , θ ) = [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 2 − cos θ ] + ( sin θ [ 0 − c b 0 c 0 − a 0 − b a 0 0 0 0 0 0 ] a 2 + b 2 + c 2 \displaystyle R\left(x_0,y_0,z_0,a,b,c,\theta\right)=\left[ \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 2-\cos \theta \\ \end{array} \right]+\left(\frac{\sin \theta \left[ \begin{array}{rrrr} 0 & -c & b & 0 \\ c & 0 & -a & 0 \\ -b & a & 0 & 0 \\ 0 & 0 & 0 & 0 \\ \end{array} \right]}{\sqrt{a^2+b^2+c^2}} \right. R(x0,y0,z0,a,b,c,θ)= 1000010000100002−cosθ + a2+b2+c2sinθ 0c−b0−c0a0b−a000000
− ( 1 − cos θ ) ( [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ] − [ a b c 0 ] . [ a b c 0 ] a 2 + b 2 + c 2 ) ) . [ 1 0 0 − x 0 0 1 0 − y 0 0 0 1 − z 0 0 0 0 1 ] \displaystyle {\left.-(1-\cos \theta) \left(\left[ \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} \right]-\frac{\left[ \begin{array}{c} a \\ b \\ c \\ 0 \\ \end{array} \right].\left[ \begin{array}{cccc} a & b & c & 0 \\ \end{array} \right]}{a^2+b^2+c^2}\right)\right).\left[ \begin{array}{rrrr} 1 & 0 & 0 & -{x_0} \\ 0 & 1 & 0 & -{y_0} \\ 0 & 0 & 1 & -{z_0} \\ 0 & 0 & 0 & 1 \\ \end{array} \right]} −(1−cosθ) 1000010000100001 −a2+b2+c2 abc0 .[abc0] . 100001000010−x0−y0−z01