四元數與三維空間旋轉

本文的閱讀等級:中級

愛爾蘭數學家哈密頓 (William Rowan Hamilton) 將複數 z=a+bi,其中 a,b 是實數,i=\sqrt{-1} 是虛數單位,延伸為四元數 (quaternion),即一個實數加上三個虛部,

\displaystyle  q=a+bi+cj+dk

其中 a,b,c,d 是實數,虛數單位 i,j,k 滿足基本公式

\displaystyle  i^2=j^2=k^2=ijk=-1

任一複數 z 與單位複數 e^{i\theta}=\cos\theta+i\sin\theta 的乘積 ze^{i\theta} 可以解讀為點 z 在二維複數平面逆時針旋轉 \theta 徑度 (見“複數的矩陣表示”)。類似地,四元數亦可表示三維空間旋轉,不過這個性質不像複數蘊含平面旋轉那般明顯,因為實在難以想像處於 \mathbb{R}^4 的四元數如何對 \mathbb{R}^3 向量執行運算。

 
我們先回顧四元數的表達與基本運算 (見“四元數”)。為了便利解決幾何問題,不妨將四元數 q=a+bi+cj+dk 視為純量─向量和 q=a+\mathbf{v},其中 \mathbf{v}=(b,c,d)\in\mathbb{R}^3,因此三維向量 \mathbf{v} 可以看成實部 (純量) 為零的四元數。對於 q_1=a_1+\mathbf{v}_1q_2=a_2+\mathbf{v}_2,四元數加法分別計算純量與向量加法:

\displaystyle  q_1+q_2=(a_1+\mathbf{v}_1)+(a_2+\mathbf{v}_2)=(a_1+a_2)+(\mathbf{v}_1+\mathbf{v}_2)

使用四元數的虛數單位的基本公式可推導出乘法運算規則 (見附註[1]):

\displaystyle  q_1q_2=(a_1+\mathbf{v}_1)(a_2+\mathbf{v}_2)=(a_1a_2-\mathbf{v}_1\cdot\mathbf{v}_2)+(a_1\mathbf{v}_2+a_2\mathbf{v}_1+\mathbf{v}_1\times\mathbf{v}_2)

其中 \mathbf{v}_1\cdot\mathbf{v}_2 是點積 (dot product),\mathbf{v}_1\times\mathbf{v}_2 是向量積 (外積,cross product)。另一方面,利用分配律,

\displaystyle  q_1q_2=(a_1+\mathbf{v}_1)(a_2+\mathbf{v}_2)=a_1a_2+a_1\mathbf{v}_2+a_2\mathbf{v}_1+\mathbf{v}_1\mathbf{v}_2

比較上面兩式,我們可以定義「向量乘法」

\displaystyle  \mathbf{v}_1\mathbf{v}_2=\mathbf{v}_1\times\mathbf{v}_2-\mathbf{v}_1\cdot\mathbf{v}_2

表面上,這個運算非常奇怪,因為 \mathbf{v}_1\mathbf{v}_2 既非向量也不是純量。所謂的「向量乘法」其實是四元數乘法,\mathbf{v}_1\mathbf{v}_2=(0+\mathbf{v}_1)(0+\mathbf{v}_2),所以「向量乘法」僅有形式上的意義,並不具備幾何意義。以純量─向量和表示的四元數 q=a+\mathbf{v} 的共軛、絕對值以及逆元分別為

\displaystyle\begin{aligned}  q^\ast&=a-\mathbf{v}\\  \vert q\vert&=\sqrt{a^2+\mathbf{v}\cdot\mathbf{v}}=\sqrt{a^2+\Vert\mathbf{v}\Vert^2}\\  q^{-1}&=\frac{q^\ast}{\vert q\vert^2}=\frac{a-\mathbf{v}}{a^2+\mathbf{v}\cdot\mathbf{v}}.\end{aligned}

 
透過四元數乘法,我們可以設計出定義於 \mathbb{R}^3 的線性變換。給定一個四元數 q=a+\mathbf{v},定義 L_q:\mathbb{R}^3\to\mathbb{R}^3,如下:

\displaystyle  L_q(\mathbf{x})=q\mathbf{x}q^\ast

其中 \mathbf{x}\in\mathbb{R}^3 當作實部等於零的四元數 0+\mathbf{x}。套用四元數乘法運算規則,以及外積恆等式 (\mathbf{a}\times\mathbf{b})\cdot\mathbf{a}=0\mathbf{a}\times(\mathbf{b}\times\mathbf{c})=\mathbf{b}(\mathbf{a}\cdot\mathbf{c})-\mathbf{c}(\mathbf{a}\cdot\mathbf{b}) (見“答張盛東──關於外積與行列式的關係”),其中 \mathbf{a},\mathbf{b},\mathbf{c}\in\mathbb{R}^3,可得

\displaystyle\begin{aligned}  q\mathbf{x}q^\ast&=(a+\mathbf{v})(0+\mathbf{x})(a-\mathbf{v})\\  &=(-\mathbf{v}\cdot\mathbf{x}+a\mathbf{x}+\mathbf{v}\times\mathbf{x})(a-\mathbf{v})\\  &=-(\mathbf{v}\cdot\mathbf{x})a-(a\mathbf{x}+\mathbf{v}\times\mathbf{x})\cdot(-\mathbf{v})+(-\mathbf{v}\cdot\mathbf{x})(-\mathbf{v})\\  &~~~~+a(a\mathbf{x}+\mathbf{v}\times\mathbf{x})+(a\mathbf{x}+\mathbf{v}\times\mathbf{x})\times(-\mathbf{v})\\  &=-(\mathbf{v}\cdot\mathbf{x})a+a(\mathbf{x}\cdot\mathbf{v})+(\mathbf{v}\times\mathbf{x})\cdot\mathbf{v}+(\mathbf{v}\cdot\mathbf{x})\mathbf{v}\\  &~~~~+a^2\mathbf{x}+a(\mathbf{v}\times\mathbf{x})-a(\mathbf{x}\times\mathbf{v})-(\mathbf{v}\times\mathbf{x})\times\mathbf{v}\\  &=(\mathbf{v}\cdot\mathbf{x})\mathbf{v}+a^2\mathbf{x}+2a(\mathbf{v}\times\mathbf{x})-\mathbf{x}(\mathbf{v}\cdot\mathbf{v})+\mathbf{v}(\mathbf{x}\cdot\mathbf{v})\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{x}+2(\mathbf{v}\cdot\mathbf{x})\mathbf{v}+2a(\mathbf{v}\times\mathbf{x}),  \end{aligned}

故證明 L_q(\mathbf{x})\in\mathbb{R}^3。下面列舉 L_q 的三個重要性質。

  1. L_q:\mathbb{R}^3\to\mathbb{R}^3 是一個線性變換,也就是說,對於任意 \mathbf{x},\mathbf{y}\in\mathbb{R}^3 和純量 \alpha\in\mathbb{R}

    \displaystyle  L_q(\mathbf{x}+\mathbf{y})=L_q(\mathbf{x})+L_q(\mathbf{y}),~~~L_q(\alpha\mathbf{x})=\alpha L_q(\mathbf{x})

    使用上述 L_q(\mathbf{x}) 的展開式,

    \displaystyle\begin{aligned}  L_q(\mathbf{x}+\mathbf{y})&=(a^2-\Vert\mathbf{v}\Vert^2)(\mathbf{x}+\mathbf{y})+2(\mathbf{v}\cdot(\mathbf{x}+\mathbf{y}))\mathbf{v}+2a(\mathbf{v}\times(\mathbf{x}+\mathbf{y}))\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{x}+(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{y}+2(\mathbf{v}\cdot\mathbf{x})\mathbf{v}+2(\mathbf{v}\cdot\mathbf{y})\mathbf{v}+2a(\mathbf{v}\times\mathbf{x})+2a(\mathbf{v}\times\mathbf{y})\\  &=L_q(\mathbf{x})+L_q(\mathbf{y})  \end{aligned}

    \displaystyle\begin{aligned}  L_q(\alpha\mathbf{x})&=(a^2-\Vert\mathbf{v}\Vert^2)(\alpha\mathbf{x})+2(\mathbf{v}\cdot(\alpha\mathbf{x}))\mathbf{v}+2a(\mathbf{v}\times(\alpha\mathbf{x}))\\  &=\alpha(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{x}+2\alpha(\mathbf{v}\cdot\mathbf{x})\mathbf{v}+2\alpha a(\mathbf{v}\times\mathbf{x})\\  &=\alpha L_q(\mathbf{x}).  \end{aligned}

  2. q=a+\mathbf{v} 為單位四元數,即 \vert q\vert=1,則每一 \mathbf{x}\in\mathbb{R}^3 滿足 \Vert L_q(\mathbf{x})\Vert=\Vert\mathbf{x}\Vert

    直接計算即可驗證,如下:

    \displaystyle  \Vert L_q(\mathbf{x})\Vert=\Vert q\mathbf{x}q^\ast\Vert=\vert q\vert~\Vert\mathbf{x}\Vert~\vert q^\ast\vert=\Vert\mathbf{x}\Vert

    上面使用了 \vert q\vert=\vert q^\ast\vert=1。這個現象稱為等距同構 (isometry),詳見“等距同構與么正矩陣”。

  3. q=a+\mathbf{v} 為單位四元數,則 L_q(\alpha\mathbf{v})=\alpha\mathbf{v}\alpha\in\mathbb{R}

    證明於下:

    \displaystyle\begin{aligned}  L_q(\alpha\mathbf{v})&=q(\alpha\mathbf{v})q^\ast\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\alpha\mathbf{v}+2(\mathbf{v}\cdot \alpha\mathbf{v})\mathbf{v}+2a(\mathbf{v}\times \alpha\mathbf{v})\\  &=\alpha(a^2+\Vert\mathbf{v}\Vert^2)\mathbf{v}=\alpha\vert q\vert^2\mathbf{v}=\alpha\mathbf{v}.  \end{aligned}

 
羅德里格旋轉公式

q=a+\mathbf{v} 為單位四元數,即 \vert q\vert^2=a^2+\Vert\mathbf{v}\Vert^2=1,設 a^2=\cos^2\frac{\theta}{2}\Vert\mathbf{v}\Vert^2=\sin^2\frac{\theta}{2}。因此,存在 \theta\in[0,2\pi) 使得 a=\cos\frac{\theta}{2}\Vert\mathbf{v}\Vert=\sin\frac{\theta}{2}\ge 0。令 \mathbf{u}=\frac{\mathbf{v}}{\Vert\mathbf{v}\Vert}。每一個單位四元數 q=a+\mathbf{v} 定可表示為

\displaystyle  q=\cos\frac{\theta}{2}+\sin\frac{\theta}{2}\mathbf{u}

其中 \Vert\mathbf{u}\Vert=1。我們可以證明:以單位向量 \mathbf{u} 為轉軸,線性變換 L_q(\mathbf{x})=q\mathbf{x}q^\ast 代表 \mathbf{x} 逆時針旋轉 \theta 徑度。將給定向量 \mathbf{x} 分解成 \mathbf{x}=\mathbf{z}+\mathbf{n},其中 \mathbf{z}\mathbf{x} 在轉軸 \mathbf{u} 的正交投影,\mathbf{n} 代表垂直於 \mathbf{u} 的成分。因為 L_q(\mathbf{x})=L_q(\mathbf{z}+\mathbf{n})=L_q(\mathbf{z})+L_q(\mathbf{n}),我們要證明 L_q 不改變 \mathbf{z}L_q\mathbf{n} 逆時針旋轉 \theta 角度,見下圖。

Quaternion and 3D rotations

三維空間旋轉

 
因為存在唯一 \alpha\in\mathbb{R} 使 \mathbf{z}=\alpha\mathbf{u},由前述性質 (2) 可知 L_q(\mathbf{z})=\mathbf{z}。利用 \mathbf{n}\perp\mathbf{u},即 \mathbf{n}\perp\mathbf{v},可得

\displaystyle\begin{aligned}  L_q(\mathbf{n})&=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{n}+2(\mathbf{v}\cdot\mathbf{n})\mathbf{v}+2a(\mathbf{v}\times\mathbf{n})\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{n}+2a(\mathbf{v}\times\mathbf{n})\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{n}+2a\Vert\mathbf{v}\Vert(\mathbf{u}\times\mathbf{n})\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{n}+2a\Vert\mathbf{v}\Vert\mathbf{n}_{\perp},  \end{aligned}

上面令 \mathbf{n}_{\perp}=\mathbf{u}\times\mathbf{n}。注意 \mathbf{n}_\perp 垂直於 \mathbf{n}

\displaystyle  \Vert\mathbf{n}_\perp\Vert=\Vert \mathbf{u}\times{\mathbf{n}}\Vert=\Vert\mathbf{u}\Vert~\Vert\mathbf{n}\Vert\sin\frac{\pi}{2}=\Vert\mathbf{n}\Vert

最後,將 a=\cos\frac{\theta}{2}\Vert\mathbf{v}\Vert=\sin\frac{\theta}{2} 代入 L_q(\mathbf{n}) 的表達式,使用倍角公式,

\displaystyle\begin{aligned}  L_q(\mathbf{n})&=\left(\cos^2\frac{\theta}{2}-\sin^2\frac{\theta}{2}\right)\mathbf{n}+\left(2\cos\frac{\theta}{2}\sin\frac{\theta}{2}\right)\mathbf{n}_\perp\\  &=\cos\theta\mathbf{n}+\sin\theta\mathbf{n}_\perp,\end{aligned}

證明 L_q(\mathbf{n}) 即是垂直於轉軸 \mathbf{u} 的平面上 \mathbf{n} 逆時針旋轉 \theta 而得的向量。

Olinde Rodrigues (1795–1851) From Wikimedia

 
將單位四元數 q=\cos\frac{\theta}{2}+\sin\frac{\theta}{2}\mathbf{u} 代入旋轉變換 L_q(\mathbf{x}) 的展開式,套用倍角公式和半角公式,推得

\displaystyle\begin{aligned}  L_q(\mathbf{x})&=\left(\cos^2\frac{\theta}{2}-\sin^2\frac{\theta}{2}\right)\mathbf{x}+2\left(\sin\frac{\theta}{2}\mathbf{u}\cdot\mathbf{x}\right)\sin\frac{\theta}{2}\mathbf{u}+2\cos\frac{\theta}{2}\left(\sin\frac{\theta}{2}\mathbf{u}\times\mathbf{x}\right)\\  &=\cos\theta\mathbf{x}+(1-\cos\theta)(\mathbf{u}\cdot\mathbf{x})\mathbf{u}+\sin\theta(\mathbf{u}\times\mathbf{x}).  \end{aligned}

上式稱為羅德里格旋轉公式 (Rodrigues’ rotation formula),因法國數學家羅德里格 (Olinde Rodrigues) 而得名。給定 \mathbf{u}=(u_1,u_2,u_3)\mathbf{x}=(x_1,x_2,x_3),外積運算 \mathbf{u}\times \mathbf{x} 可用矩陣乘法表示如下:

\displaystyle  \mathbf{u}\times\mathbf{x}=\begin{bmatrix}  u_2x_3-u_3x_2\\  u_3x_1-u_1x_3\\  u_1x_2-u_2x_1  \end{bmatrix}=\left[\!\!\begin{array}{rrr}  0&-u_3&u_2\\  u_3&0&-u_1\\  -u_2&u_1&0  \end{array}\!\!\right]\begin{bmatrix}  x_1\\  x_2\\  x_3  \end{bmatrix}=\begin{bmatrix}  \mathbf{u}  \end{bmatrix}_{\times}\mathbf{x}

上面我們定義「外積矩陣」為 \begin{bmatrix}  \mathbf{u}  \end{bmatrix}_{\times}=\left[\!\!\begin{array}{rrr}  0&-u_3&u_2\\  u_3&0&-u_1\\  -u_2&u_1&0  \end{array}\!\!\right]。再將內積改寫成 \mathbf{u}\cdot\mathbf{x}=\mathbf{u}^T\mathbf{x},羅德里格旋轉公式可表示成矩陣形式:

\displaystyle\begin{aligned}  L_q(\mathbf{x})&=\cos\theta I\mathbf{x}+(1-\cos\theta)\mathbf{u}\mathbf{u}^T\mathbf{x}+\sin\theta\begin{bmatrix}  \mathbf{u}  \end{bmatrix}_{\times}\mathbf{x}\\  &=\left(\cos\theta I+(1-\cos\theta)\mathbf{u}\mathbf{u}^T+\sin\theta\begin{bmatrix}  \mathbf{u}  \end{bmatrix}_{\times}\right)\mathbf{x}.  \end{aligned}

R_\mathbf{u}(\theta) 表示旋轉軸為 \mathbf{u},轉角等於 \theta3\times 3 階旋轉矩陣。從上面的羅德里格旋轉公式,可得

\displaystyle  \begin{aligned}  R_\mathbf{u}(\theta)&=\cos\theta I+(1-\cos\theta)\mathbf{u}\mathbf{u}^T+\sin\theta\begin{bmatrix}  \mathbf{u}  \end{bmatrix}_{\times}\\  &=\begin{bmatrix}  u_1u_1v\theta+c\theta&u_1u_2v\theta-u_3s\theta&u_1u_3v\theta+u_2s\theta\\  u_1u_2v\theta+u_3s\theta&u_2u_2v\theta+c\theta&u_2u_3v\theta-u_1s\theta\\  u_1u_3v\theta-u_2s\theta&u_2u_3v\theta+u_1s\theta&u_3u_3v\theta+c\theta  \end{bmatrix},\end{aligned}

其中 c\theta=\cos\thetas\theta=\sin\thetav\theta=1-\cos\theta。轉角 \theta 的大小由右手法則決定,即大拇指朝向轉軸的正方向 \mathbf{u},其餘四根手指的彎曲方向為旋轉方向。

 
給定一個單位四元數 q=a+\mathbf{v},其中 \mathbf{v}=(b,c,d)^T,利用 L_q(\mathbf{x}) 公式亦可得到以 a,b,c,d 表示的旋轉矩陣 R,如下:

\displaystyle\begin{aligned}  R\mathbf{x}&=L_q(\mathbf{x})=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{x}+2(\mathbf{v}\cdot\mathbf{x})\mathbf{v}+2a(\mathbf{v}\times\mathbf{x})\\  &=(a^2-\Vert\mathbf{v}\Vert^2)\mathbf{x}+2\mathbf{v}\mathbf{v}^T\mathbf{x}+2a\begin{bmatrix}  \mathbf{v}\end{bmatrix}_\times\mathbf{x}\\  &=\left((a^2-\Vert\mathbf{v}\Vert^2)I+2\mathbf{v}\mathbf{v}^T+2a\begin{bmatrix}  \mathbf{v}\end{bmatrix}_\times\right)\mathbf{x}\\  &=\begin{bmatrix}  a^2+b^2-c^2-d^2&2bc-2ad&2bd+2ac\\  2bc+2ad&a^2-b^2+c^2-d^2&2cd-2ab\\  2bd-2ac&2cd+2ab&a^2-b^2-c^2+d^2  \end{bmatrix}\mathbf{x}.  \end{aligned}

反之,給定旋轉矩陣 R=[r_{ij}],如何求出對應的單位四元數 q=a+bi+cj+dk?因為 a^2+b^2+c^2+d^2=1r_{11}+r_{22}+r_{33}=3a^2-b^2-c^2-d^2,推得 4a^2=1+r_{11}+r_{22}+r_{33}。不難驗證

\displaystyle\begin{aligned}  a&=\pm\frac{1}{2}\sqrt{1+r_{11}+r_{22}+r_{33}}\\  b&=\frac{r_{32}-r_{23}}{4a}\\  c&=\frac{r_{13}-r_{31}}{4a}\\  d&=\frac{r_{21}-r_{12}}{4a}.  \end{aligned}

 
註解
[1] 使用分配律與四元數乘法運算規則,

\displaystyle\begin{aligned}  q_1q_2&=(a_1+\mathbf{v}_1)(a_2+\mathbf{v}_2)\\  &=(a_1+b_1i+c_1j+d_1k)(a_2+b_2i+c_2j+d_2k)\\  &=(a_1a_2-b_1b_2-c_1c_2-d_1d_2)+(a_1b_2+b_1a_2+c_1d_2-d_1c_2)i\\    &~~~~+(a_1c_2-b_1d_2+c_1a_2+d_1b_2)j+(a_1d_2+b_1c_2-c_1b_2+d_1a_2)k.    \end{aligned}

代入

\displaystyle\begin{aligned}  \mathbf{v}_1\cdot\mathbf{v}_2&=b_1b_2+c_1c_2+d_1d_2\\  \mathbf{v}_1\times\mathbf{v}_2&=\begin{vmatrix}  i&j&k\\  b_1&c_1&d_1\\  b_2&c_2&d_2  \end{vmatrix}=(c_1d_2-c_2d_1)i+(d_1b_2-d_2b_1)j+(b_1c_2-b_2c_1)k,  \end{aligned}

可得

\displaystyle\begin{aligned}  q_1q_2&=(a_1a_2-\mathbf{v}_1\cdot\mathbf{v}_2)+a_1(b_2i+c_2j+d_2k)+a_2(b_1i+c_1j+d_1k)\\    &~~~~+(c_1d_2-d_1c_2)i+(d_1b_2-d_2b_1)j+(b_1c_2-b_2c_1)k\\  &=(a_1a_2-\mathbf{v}_1\cdot\mathbf{v}_2)+(a_1\mathbf{v}_2+a_2\mathbf{v}_1+\mathbf{v}_1\times\mathbf{v}_2).  \end{aligned}

相關閱讀:
This entry was posted in 線性變換, 線性代數專欄 and tagged , , , , , . Bookmark the permalink.

15 Responses to 四元數與三維空間旋轉

  1. 嗡嗡 says:

    為何ijk = -1 而不是-i之類的

  2. 周老師:
    您好!
    看過您這篇四元數與三維空間旋轉文章後深受啟發,在此先表示感謝。
    但我還有一個疑問,就是在選擇單位四元數 q=\cos\frac{\theta}{2}+\sin\frac{\theta}{2}\mathbf{u} 的時候,為什麼會用半角 \frac{\theta}{2}? 只是單純為了後面的簡化嗎?有沒有更具體和通俗的解釋?

    • ccjou says:

      WordPress 輸入 LaTeX 的語法須在第一個 $ 後面加入 latex,方可正確顯示。

      L_q(\mathbf{x})=q\mathbf{x}q^\ast 代表三維空間 \mathbf{x} 以單位向量 \mathbf{u} 為軸旋轉 \theta 度,則單位四元數 q 是多少?
      答案是 q=\cos\frac{\theta}{2}+\sin\frac{\theta}{2}\mathbf{u}

      L_q(z)=qzq=q^2z 代表複數平面 z 旋轉 \theta 度,則單位複數 q 是多少?
      答案是 q=\exp(i\frac{\theta}{2})=\cos\frac{\theta}{2}+i\sin\frac{\theta}{2}

  3. 學生 says:

    線性變換 $L_q(\mathbf{x})=q\mathbf{x}q^\ast 代表 $\mathbf{x} 逆時針旋轉 $\theta 徑度
    那麼座標軸轉換也是一樣的公式嗎?

    • 學生 says:

      抱歉不太會用 Latex …
      要怎麼做兩個quaternion的轉換呢? 如:已知兩個座標, C0 與 C1,如何用 quaternion 表達兩者的關係?
      謝謝老師

      • ccjou says:

        我不確定你的問題,兩個座標C0與C1的關係是指下文的哪個問題?

        圖解基底變換、座標變換、相似變換與相似矩陣

        • 學生 says:

          不好意思沒有表達清楚!我想應該是 Q2
          我重新詮釋一次問題,再請老師幫我確認是不是Q2:
          將空間中的一個座標系 C0 旋轉後得另一座標系 C1,若有一向量 x 在 C0 的座標為 v0 = (x0,y0,z0),在 C1 的座標為 v1 = (x1,y1,z1),請問如何以 quaternion 表示 v0 與 v1 的關係?
          會有這個問題是因為在學 robotic kinematics 的時候,學到若C0 經旋轉而得 C1,且C1對應C0 的旋轉矩陣為 R(0:1) ,則上述的 v0 = R(0:1)*v1。若連續旋轉R(0:1), R(1:2),…, R(n-1:n),v0 = R(0:1)*R(1:2)*…*R(n-1:n)*v1。其中R(i-1:i) 為 Ci-1 旋轉成 Ci 的旋轉矩陣。
          因為這個,所以想知道是否 quaternion 也有這樣的性質,如:v0 = q*v1 之類的?

          不知道這樣有沒有比較清楚~

  4. dotdotdot2017 says:

    老師好奇的請教一下

    內積與外積是怎麼來的?


    1878年,英國數學家克利福德才出版Elements of Dynamic

    那羅德里格怎麼會使用內積跟外積呢?
    https://en.wikipedia.org/wiki/Olinde_Rodrigues

Leave a comment