Last updated 2 years ago
Was this helpful?
線性代數 ⟩ 向量空間 ⟩ 線性變換 ⟩ 變換法向量
一組切向量 T\mathbf{T}T 與法向量 N\mathbf{N}N 會保持垂直,但經過線性變換 M\mathbf{M}M 變換成 MT\mathbf{M}\mathbf{T}MT 與 MN\mathbf{M}\mathbf{N}MN 後,之間的垂直關係可能會被打破,這時只要利用 (M−1)T\left(\mathbf{M}^{-1}\right)^T(M−1)T 將 N\mathbf{N}N 轉換成 (M−1)TN\left(\mathbf{M}^{-1}\right)^T \mathbf{N}(M−1)TN,就可以讓 MT\mathbf{M}\mathbf{T}MT 與 (M−1)TN\left(\mathbf{M}^{-1}\right)^T \mathbf{N}(M−1)TN 再度保持垂直的關係。
(M−1)T\left(\mathbf{M}^{-1}\right)^T(M−1)T 稱為 M\mathbf{M}M 的 "inverse transpose"。
若 M\mathbf{M}M 為正交矩陣(如:旋轉或鏡射),則 (M−1)T=(MT)T=M\left(\mathbf{M}^{-1}\right)^T= \left(\mathbf{M}^{T}\right)^T = \mathbf{M}(M−1)T=(MT)T=M。
證明:👉
法向量
轉置矩陣
(M−1)T=(MT)−1\left(\mathbf{M}^{-1}\right)^T = \left(\mathbf{M}^{T}\right)^{-1}(M−1)T=(MT)−1 轉置矩陣性質 4
Math for 3D Game ⟩ 3.5 Transforming Normal Vectors ⭐️
事實上,如果從平面法向量的變化來觀察,也許更自然些。
假設一平面方程式為: ax+by+cz+d=0ax+by+cz+d=0ax+by+cz+d=0,其法向量為 N=[a,b,c]T\mathbf{N}=[a, b, c]^TN=[a,b,c]T。若設 P=[x,y,x]T\mathbf{P}=[x, y, x]^TP=[x,y,x]T,則原方程式可寫為: NTP+d=0\mathbf{N}^T \mathbf{P} + d = 0NTP+d=0。
如果 P\mathbf{P}P 點經過線性變換變成另一點 P′=MP\mathbf{P}'=\mathbf{M}\mathbf{P}P′=MP,則 P=M−1P′\mathbf{P}=\mathbf{M}^{-1}\mathbf{P}'P=M−1P′ 代回原平面方程式可得: NTM−1P′+d=0\mathbf{N}^T \mathbf{M}^{-1}\mathbf{P}' + d = 0NTM−1P′+d=0,由此可看出新的平面法向量為 N′=(NTM−1)T\mathbf{N}'=\left(\mathbf{N}^T \mathbf{M}^{-1}\right)^TN′=(NTM−1)T ,而這正是本文的主要結果:
N′=(M−1)TN\mathbf{N}'=\left( \mathbf{M}^{-1}\right)^T \mathbf{N}N′=(M−1)TN