当前位置:网站首页>Personal notes of graphics (2)
Personal notes of graphics (2)
2022-07-07 16:30:00 【qq_ fifty-seven million two hundred and fifty-one thousand thre】
Tips : Remember one 2×2 Multiply by a matrix of The result of two-dimensional vector can fully understand the following formula :
The form of transformation : Multiply a matrix by a vector ( Multiply the matrix of the same dimension by the variables of the same dimension )
linear transformation

a1 a2 x
ride
b1 b2 y
a1x+a2y,b1x+b2y
Transformation :
Except for rotation
And from the three-dimensional world to the two-dimensional world

1. The zoom :


s=0.5
Express in matrix

Uneven scaling :

sx=0.5 sy=1
2. Reflection ( symmetry )


3. shear ( Pull a corner )

( Ideas : All points y It's all the same , The only change is all points x value ,x How does the value change ?
When y by 0 When x unchanged , When y by 1 When x Add 1, When y Greater than zero and less than one be x Add a*y)
Express in matrix

An idea of writing transformation : Find some rules before and after the transformation
4. rotate ( The default is around the origin , Default CCW )

deduction




The original coordinate is (1,0) After conversion, it is (cos,sin)
Get this formula

The formula is solved as

I got it AC Value The rest is to find a point to calculate the rest BD The value of

The inverse matrix of this rotation only needs to change the lower left corner to negative , Just change the upper right corner to positive
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
Homogeneous coordinates : Because translation transformation is special , So we have the concept of homogeneous coordinates


But it can't be written in the form of a matrix multiplied by a vector just now
It can only be written like this (abcd The matrix is linear Don't do anything 1001):

Because the translation transformation is not a linear transformation
reflection : Can the calculation methods of the above transformations be unified ( Including translation , Including zoom ...)
answer : You can add a dimension

( spot : increase 1 vector : increase 0 Because vectors have translation invariance )
More significance of introducing homogeneous coordinates

Point plus point equals midpoint
Affine transformation can be in the form of coprocess matrix multiplied by variables

With translation without translation There is linear transformation, no linear transformation

inverse transformation : Reverse the previous transformation

Combination of various transformations :

The order of transformation is very important
Translate first and then rotate

First rotate in Translation

【 From right to left !!!!!!!!!】
It means that the rightmost matrix multiplies first That is to say, the rightmost one should rotate first The next matrix is the moving matrix


Decomposition of transformation :

ask : How to rotate the first picture along the lower left corner 45 degree ?
answer :1. First subtract all points c 2. Rerotation 45 degree 3. Add all the points c
Matrix form ( From right to left ):
![]()
Three dimensional space transformation

Pretty much , But there are several important properties
1. The inverse matrix of rotation is equal to the transpose matrix of rotation ( Here's the picture ) That is to say, the rotation matrix is an orthogonal matrix

2.
For us, a xyzw The point of stay 3 The point representation of dimensional space is Divide everything by w(w It must be 1 w by 1 Represents a dot )

3.
about For the rotation of three-dimensional space , Looking at the rotation can raise our right hand for instance x to turn to z Just forgive y Shaft rotation ,y Constant so 0 1 0
But why is the edge here y Axis rotation is different from other matrices , Hurt to raise our right hand , Think about the cross product rule ,
In order to get z Axis must x Cross riding y Axis ( Anti-clockwise ), In order to get x Axis must y Cross riding z( Anti-clockwise ), In order to get y Axis must z Cross riding x( Clockwise )
At this time, the smart little friend has seen it

We must remember For complex rotation, we must be able to decompose it into simple rotation That is to say, arbitrary 3d rotate
We can all write it around x Axial winding y Axial winding z Axis

α β γ These three angles are also called Euler angles
How to prove ? You can imagine three operations of the aircraft
pitch( pitch )x The axis does not change z turn x Axis
roll( Roll )z The axis does not change x To y Axis
yaw( Turn around )...

边栏推荐
- Prometheus API deletes all data of a specified job
- How to query the data of a certain day, a certain month, and a certain year in MySQL
- [C language] question set of X
- 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"?
- Xcode Revoke certificate
- [summary of knowledge] summary of notes on using SVN in PHP
- php 自带过滤和转义函数
- Good news! Kelan sundb database and Hongshu technology privacy data protection management software complete compatibility adaptation
- hellogolang
- Shader basic UV operations, translation, rotation, scaling
猜你喜欢

【Vulnhub靶场】THALES:1
![[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3](/img/8f/ca9ab042916f68de7994d9f2124da9.jpg)
[flower carving experience] 15 try to build the Arduino development environment of beetle esp32 C3

The difference and working principle between compiler and interpreter

Logback日志框架第三方jar包 免费获取

torch.numel作用

Balanced binary tree (AVL)

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

Dotween -- ease function

Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)

2022 the 4th China (Jinan) International Smart elderly care industry exhibition, Shandong old age Expo
随机推荐
PHP realizes wechat applet face recognition and face brushing login function
laravel 是怎么做到运行 composer dump-autoload 不清空 classmap 映射关系的呢?
95.(cesium篇)cesium动态单体化-3D建筑物(楼栋)
PyTorch 中的乘法:mul()、multiply()、matmul()、mm()、mv()、dot()
Description of vs common shortcut keys
Dotween -- ease function
Eye of depth (VI) -- inverse of matrix (attachment: some ideas of logistic model)
laravel中将session由文件保存改为数据库保存
Find tags in prefab in unity editing mode
47_Opencv中的轮廓查找 cv::findContours()
Prometheus API deletes all data of a specified job
Spark Tuning (III): persistence reduces secondary queries
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"?
修改配置文件后tidb无法启动
PHP has its own filtering and escape functions
Lecturer solicitation order | Apache seatunnel (cultivating) meetup sharing guests are in hot Recruitment!
Markdown formula editing tutorial
无法将“pip”项识别为 cmdlet、函数、脚本文件或可运行程序的名称
three. JS create cool snow effect
Laravel5.1 路由 -路由分组