mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-23 12:45:29 +08:00
Update 01-07
This commit is contained in:
@@ -102,7 +102,11 @@
|
|||||||
|
|
||||||
!!! Important
|
!!! Important
|
||||||
|
|
||||||
你可以通过点乘的结果计算两个非单位向量的夹角,点乘的结果分别除掉两个向量的长度 剩下的就是夹角的cos值,即了。
|
你可以通过点乘的结果计算两个非单位向量的夹角,点乘的结果分别除以两个向量的大小之积,得到的结果就是夹角的余弦值,即。
|
||||||
|
|
||||||
|
译注:通过上面点乘定义式可推出:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
所以,我们如何计算点乘?点乘是按分量逐个相乘,然后再把结果相加。两个单位向量点乘就像这样(你可以用两个长度为1的验证):
|
所以,我们如何计算点乘?点乘是按分量逐个相乘,然后再把结果相加。两个单位向量点乘就像这样(你可以用两个长度为1的验证):
|
||||||
|
|
||||||
|
BIN
img/costheta2.png
Normal file
BIN
img/costheta2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Reference in New Issue
Block a user