当前位置:网站首页>Personal notes of graphics (1)
Personal notes of graphics (1)
2022-07-07 16:30:00 【qq_ fifty-seven million two hundred and fifty-one thousand thre】
vector :AB=B-A Indicates direction and length , The vector can move at will , After moving, it is still the same vector
Unit vector : vector / The length of the vector ( It can mean direction )
Vector addition :A+B Quadrilateral rule

Triangle rule ( Put the ends together )

The default vector is column vector Transpose to row vector

//------------------------------------------------------------------------------------------------------------------//
Vector point multiplication :( Give the vector a value , Give me two vectors, and I can use the formula to calculate the included angle or the cosine of the included angle )

( If both vectors are unit vectors , Then their dot multiplication is directly the cosine of the included angle )
The nature of dot multiplication :

It is easier to express point multiplication in Cartesian coordinate system :

The use of dot multiplication : Projection

Ideas : requirement b Vector in a The projection in the direction , Then the projection must be along a Vectorial , in other words a^( A hat is expressed as a unit vector ) Multiply by a certain length , So find the length
Problem solving :b Vector and b The projected vector forms a right triangle , therefore b The vector of the projection is equal to b The length of the vector times cos angle ( Angle cosine )
Angle cosine =A and B Dot product of vector
Expansion of projection Calculate the vertical

The use of dot multiplication : Front and back
Dot multiplication is in the same direction Dot multiplication is in the negative opposite direction

The use of dot multiplication : Whether the direction is close ( The principle is the same as the above )
The most important application :
Specular reflection :
Check the light vector of specular reflection Whether it is related to the vector of the angle of view Close to
//------------------------------------------------------------------------------------------------------------------//
Vector cross product :

Judge the result of cross multiplication : Right-hand rule ( It is divided into spiral rule and three specified rules , This refers to the spiral rule )
You can hold it with your right hand and have a try

(a Cross riding b The resulting vector is related to b Cross riding a The resulting vector is in the opposite direction - Yellow line )
Some small laws of triangular coordinate system

Some properties of cross product :

(0 It means the length is 0 Vector , Not numbers 0)
Matrix of vector cross multiplication :

The function of cross product :
1. Decide left and right

Sure b Cross riding a If the vector is z Negative then a stay b The right side of the Is regular a stay b The left side of the
2. Determine the inside and outside

Judge p Whether it is inside the triangle
Anticlockwise or anticlockwise cross multiply ( such as :ab*ap bc*bp ca*cp)
In the same direction
//------------------------------------------------------------------------------------------------------------------//
The advantage of defining a rectangular coordinate system is that any vector can be decomposed into coordinate axes
You can put any vector (p vector ) It is decomposed into three axes (u v w): With projection

//------------------------------------------------------------------------------------------------------------------//
matrix :

The product of matrices ( The premise of matrix multiplication is m*n n*p n==n)
For example, three rows and two columns and Two lines and three columns

skill :
How to get The result of two rows and four columns Find the number in the second row in the first matrix 5 2
The second matrix finds the number in the fourth column 4 3
Then multiply these two groups of points (5*4+2*3=26)

Matrix properties :

The distribution rate of associative law has
There is no exchange law
Matrix operations
A matrix is multiplied by a vector :

The transpose of the matrix :

Unit matrix ( Diagonal matrix )

The inverse of the unique action matrix a and a Multiply the inverse matrix of Can get the identity matrix
Dot product of matrix :

Cross multiplication of matrices

边栏推荐
- Balanced binary tree (AVL)
- Application example of infinite list [uigridview]
- Introduction to ThinkPHP URL routing
- Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi
- Laravel constructor and middleware execution order
- Imitate the choice of enterprise wechat conference room
- JS 模块化
- laravel中将session由文件保存改为数据库保存
- 模拟Servlet的本质
- three. JS create cool snow effect
猜你喜欢

Dotween -- ease function

Plate - forme de surveillance par étapes zabbix

预测——灰色预测
![[vulnhub range] thales:1](/img/fb/721d08697afe9b26c94fede628c4d1.png)
[vulnhub range] thales:1

The unity vector rotates at a point

Unity3D_ Class fishing project, control the distance between collision walls to adapt to different models

融云斩获 2022 中国信创数字化办公门户卓越产品奖!

Excessive dependence on subsidies, difficult collection of key customers, and how strong is the potential to reach the dream of "the first share of domestic databases"?

全网“追杀”钟薛高

PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
随机推荐
3000 words speak through HTTP cache
hellogolang
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
Spark Tuning (III): persistence reduces secondary queries
Balanced binary tree (AVL)
URL和URI的关系
Laravel 服务提供者实例教程 —— 创建 Service Provider 测试实例
分类模型评价标准(performance measure)
PHP realizes wechat applet face recognition and face brushing login function
安科瑞电网智能化发展的必然趋势电力系统采用微机保护装置是
[C language] question set of X
Find tags in prefab in unity editing mode
记一次项目的迁移过程
95. (cesium chapter) cesium dynamic monomer-3d building (building)
JS modularization
Laravel changed the session from file saving to database saving
How does laravel run composer dump autoload without emptying the classmap mapping relationship?
logback. XML configure logs of different levels and set color output
asyncio 概念和用法
Aerospace Hongtu information won the bid for the database system research and development project of a unit in Urumqi