当前位置:网站首页>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
边栏推荐
- Pycharm terminal enables virtual environment
- 【HCSD大咖直播】亲授大厂面试秘诀-简要笔记
- hellogolang
- Prometheus API deletes all data of a specified job
- Power of leetcode-231-2
- PHP实现微信小程序人脸识别刷脸登录功能
- 预测——灰色预测
- 121. 买卖股票的最佳时机
- 谈谈 SAP iRPA Studio 创建的本地项目的云端部署问题
- The inevitable trend of the intelligent development of ankerui power grid is that microcomputer protection devices are used in power systems
猜你喜欢
What are compiled languages and interpreted languages?
Enterprise log analysis system elk
预测——灰色预测
[vulnhub range] thales:1
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
Shandong old age Expo, 2022 China smart elderly care exhibition, smart elderly care and aging technology exhibition
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"?
Application example of infinite list [uigridview]
平衡二叉树(AVL)
全网“追杀”钟薛高
随机推荐
Application example of infinite list [uigridview]
分步式监控平台zabbix
47_ Contour lookup in opencv cv:: findcontours()
Unity3D_ Class fishing project, bullet rebound effect is achieved
应用程序和matlab的通信方式
PHP实现执行定时任务的几种思路详解
SysOM 案例解析:消失的内存都去哪了 !| 龙蜥技术
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
The unity vector rotates at a point
Use moviepy Editor clips videos and intercepts video clips in batches
修改配置文件后tidb无法启动
Xcode Revoke certificate
1亿单身男女“在线相亲”,撑起130亿IPO
Apache Doris just "graduated": why should we pay attention to this kind of SQL data warehouse?
47_Opencv中的轮廓查找 cv::findContours()
TiDB For PostgreSQL和YugabyteDB在Sysbench上的性能对比
记录Servlet学习时的一次乱码
Xingruige database was shortlisted as the "typical solution for information technology application and innovation in Fujian Province in 2021"
PHP realizes wechat applet face recognition and face brushing login function