File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed
Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ #3 .5 法向量变换
2+
3+ ##3 .5.1 法向量变换的问题
4+
5+ 在一个多边形模型中,含有大量的顶点向量数据。
6+
7+ 同时,对于一个顶点数据,还有可能其他相关的数据。比如,切线向量(简称切向量)和法线向量(简称法向量)。
8+
9+ 这些向量都是相关联的。我们在通过矩阵变换顶点向量的同时,也要相应的变换切向量和法向量。
10+
11+ 对于非正交矩阵M,如果使用M来变换法向量,由于非正交矩阵不具备长度和角度不变性,所以无法保证变换后的法向量与切向量垂直!其情况如下图所示:
12+
13+ ![ 替代文本] ( pic/3-5-1.png " 3-5-1.png ")
14+
15+ ##3 .5.2 法向量变换的方法
16+
17+ 已知变换矩阵M,则法向量变换矩阵G可以表示为:
18+
19+ <img src =" http://www.forkosh.com/mathtex.cgi?\[G = {\left( {{M^{ - 1}}} \right)^T}\] " >
20+
21+ ###3 .5.2.1 法向量变换矩阵推导
22+
23+ 已知:变换矩阵M,切向量T,法向量N
24+ 求:变换法向量N的变换矩阵G
25+
26+ 解:
27+
28+ 由T和N互相垂直,得:N·T=0 ①
29+
30+ 设变换后的切向量,法向量,分别为:T',N'
31+
32+ 则,有:T'=MT
33+
34+ 由T'和N'互相垂直,得:
35+
36+ N'·T'=(GN)·(MT)=0
37+
38+ 简单推导,得:
39+
40+ <img src =" http://www.forkosh.com/mathtex.cgi?\[\left( {GN} \right) \cdot \left( {MT} \right) = {\left( {GN} \right)^T}\left( {MT} \right) = {N^T}{G^T}MT=0\] " >②
41+
42+ 由①=②,并削去相同项得:
43+
44+ <img src =" http://www.forkosh.com/mathtex.cgi?\[\begin{gathered} {N^T}{G^T}MT = {N^T}T \hfill \\ {G^T}M = I \hfill \\ G = {\left( {{M^{ - 1}}} \right)^T} \hfill \\ \end{gathered} \] " >
45+
46+ ###3 .5.2.2 法向量变换矩阵推论
47+
48+ 由法向量变换矩阵可知,当M为正交矩阵时,G=M。这种情况,可以避免求逆转置矩阵的大量运算。
49+
50+ ======================
51+ <a rel =" license " href =" http://creativecommons.org/licenses/by-nc-sa/3.0/cn/ " ><img alt =" 知识共享许可协议 " style =" border-width :0 " src =" https://i.creativecommons.org/l/by-nc-sa/3.0/cn/88x31.png " /></a ><br />本作品采用<a rel =" license " href =" http://creativecommons.org/licenses/by-nc-sa/3.0/cn/ " >知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议</a >进行许可。
You can’t perform that action at this time.
0 commit comments