Fundamental of Computer Graphics Note ch5ch6 - LinearAlgebra and Transformation Matrices

Matrices

identity matrix:
I = [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ] I = \left[\begin{matrix} 1 & 0 & 0 & 0 \\ 0 &1 &0 &0 \\ 0&0&1&0\\0&0&0&1\end{matrix}\right] I=1000010000100001
inverse matrix A − 1 A^{-1} A1 of A A A:
A A − 1 = I AA^{-1} = I AA1=I
( A B ) − 1 = B − 1 A − 1 (AB)^{-1} = B ^{-1} A^{-1} (AB)1=B1A1
transpose A T A^T AT of A A A: a i j = a j i ′ a_{ij} = a'_{ji} aij=aji
[ 1 2 3 4 5 6 ] T = [ 1 3 5 2 4 6 ] \left[\begin{matrix} 1 & 2 \\ 3 &4 \\ 5&6\end{matrix}\right]^T = \left[\begin{matrix} 1 &3&5\\2&4&6\end{matrix}\right] 135246T=[123456]
( A B ) T = B T A T (AB)^T=B^TA^T (AB)T=BTAT
∣ A B ∣ = ∣ A ∣ ∣ B ∣ |AB| = |A||B| AB=AB
∣ A − 1 ∣ = 1 ∣ A ∣ |A^{-1}| = \frac{1}{|A|} A1=A1
∣ A T ∣ = ∣ A ∣ |A^T| = |A| AT=A
a diagonal matrix: where all nonzero elements occur along the diagonal.
I = [ 8 0 0 0 2 0 0 0 9 ] I = \left[\begin{matrix} 8 & 0 & 0 \\ 0 &2 &0 \\ 0&0&9\end{matrix}\right] I=800020009
symmetric. matrix:
I = [ 1 1 2 1 9 7 2 7 1 ] I = \left[\begin{matrix} 1 & 1 & 2 \\ 1 &9 &7 \\ 2&7&1\end{matrix}\right] I=112197271
orthogonal matrix: for orthogonal R R R
Each of its columns considered as a vector has length 1 and the columns are orthogonal to one another.
R T R = I = R R T R^TR = I = RR^T RTR=I=RRT
I = [ 0 1 0 0 0 1 1 0 0 ] I = \left[\begin{matrix} 0 & 1 & 0 \\ 0 &0 &1 \\ 1&0&0\end{matrix}\right] I=001100010

TransformationMatrices

Scale

s c a l e ( s x , s y ) = [ s x 0 0 s y ] scale(s_x, s_y) = \left[\begin{matrix}s_x & 0\\ 0 &s_y \end{matrix}\right] scale(sx,sy)=[sx00sy]
[ s x 0 0 s y ] [ s x s y ] = [ s x x s y y ] \left[\begin{matrix}s_x & 0\\ 0 &s_y \end{matrix}\right] \left[\begin{matrix}s_x \\ s_y \end{matrix}\right] = \left[\begin{matrix}s_xx \\ s_yy \end{matrix}\right] [sx00sy][sxsy]=[sxxsyy]
scale

Shearing

s h e a r − x ( s ) = [ 1 s 0 1 ] , s h e a r − y ( s ) = [ 1 0 s 1 ] shear-x(s) = \left[\begin{matrix}1 & s\\ 0 &1 \end{matrix}\right] , shear-y(s) = \left[\begin{matrix}1 & 0\\ s &1 \end{matrix}\right] shearx(s)=[10s1],sheary(s)=[1s01]
shear

Rotation

r o t a t e ( θ ) = [ cos ⁡ θ − sin ⁡ θ sin ⁡ θ cos ⁡ θ ] rotate(\theta)=\left[\begin{matrix}\cos\theta & -\sin\theta \\ \sin\theta &\cos\theta \end{matrix}\right] rotate(θ)=[cosθsinθsinθcosθ]
rotation

Reflection

r e f l e c t i o n − x ( s ) = [ − 1 0 0 1 ] , r e f l e c t i o n − y ( s ) = [ 1 0 0 − 1 ] reflection-x(s) = \left[\begin{matrix}-1 & 0\\ 0 &1 \end{matrix}\right] , reflection-y(s) = \left[\begin{matrix}1 & 0\\ 0 &-1 \end{matrix}\right] reflectionx(s)=[1001],reflectiony(s)=[1001]

Composition and Decomposition of Transformations

f i r s t , v 2 = S v 1 , t h e n , v 3 = R v 2 = > v 3 = R ( S v 1 ) = > v 3 = ( R S ) v 1 , M = R S first,v_2=Sv_1,then,v_3=Rv_2 => v_3 = R(Sv_1) => v_3 = (RS)v_1 , M = RS first,v2=Sv1,then,v3=Rv2=>v3=R(Sv1)=>v3=(RS)v1,M=RS
It is very important to remember that these transforms are applied from the right side first.
M = RS first applies S and then R

3D Linear Transformations

Scale 3D

s c a l e ( s x , s y , s z ) = [ s x 0 0 0 s y 0 0 0 s z ] scale(s_x, s_y, s_z) = \left[\begin{matrix}s_x & 0 & 0\\ 0 &s_y & 0\\ 0 & 0 & s_z \end{matrix}\right] scale(sx,sy,sz)=sx000sy000sz

Shearing 3D

s h e a r − x ( d y , d z ) = [ 1 d y d z 0 1 0 0 0 1 ] shear-x(d_y,d_z) = \left[\begin{matrix}1 & d_y & d_z\\ 0 &1 &0 \\ 0&0&1\end{matrix}\right] shearx(dy,dz)=100dy10dz01

Rotate 3D

r o t a t e − z ( θ ) = [ cos ⁡ θ − sin ⁡ θ 0 sin ⁡ θ cos ⁡ θ 0 0 0 1 ] rotate-z(\theta)=\left[\begin{matrix}\cos\theta & -\sin\theta &0\\ \sin\theta &\cos\theta &0\\0&0&1 \end{matrix}\right] rotatez(θ)=cosθsinθ0sinθcosθ0001
r o t a t e − x ( θ ) = [ 1 0 0 0 cos ⁡ θ − sin ⁡ θ 0 sin ⁡ θ cos ⁡ θ ] rotate-x(\theta)=\left[\begin{matrix}1 & 0 &0 \\ 0 &\cos\theta & -\sin\theta\\0&\sin\theta &\cos\theta \end{matrix}\right] rotatex(θ)=1000cosθsinθ0sinθcosθ
r o t a t e − y ( θ ) = [ cos ⁡ θ 0 sin ⁡ θ 0 1 0 − s i n θ 0 cos ⁡ θ ] rotate-y(\theta)=\left[\begin{matrix}\cos\theta & 0 &\sin\theta \\ 0 &1 &0 \\-sin\theta& 0&\cos\theta \end{matrix}\right] rotatey(θ)=cosθ0sinθ010sinθ0cosθ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

习惯就好zz

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值