Math Cheat Sheet for programmers and game designers

© All Rights Reserved

155 views

Math Cheat Sheet for programmers and game designers

© All Rights Reserved

- floyds algorithm
- A STUDY ON THE PROBLEMS FACED BY RURAL TAMIL MEDIUM STUDENTS IN PROFESSIONAL ENGINEERING COLLEGE USING CETD MATRIX
- PU 4 YEARS BBA I Semester Syllabus
- Skills Matrix
- std.pdf
- Section 3.2 Properties of Determinants
- Spatial Modeler
- Transformation of Axes
- Act 4_Vector Addition and the Force Table_repaired
- Fin Term
- Determinants matrices algebra
- Matrix
- Coordinate Transformation Based Contour Following Control for Robotic Systems
- Geometry Concepts.txt
- nn01.pdf
- EE-SEMESTER-I-VIII-HPTU-SYLLABUS.pdf
- HomeworkSolutionsF05.pdf
- A Generalized Optimal Sensor Placement Technique for Structural Health Monitoring and System Identification 2014 Procedia Engineering
- MATH1902 - Course Outline
- 19matrices Determinants

You are on page 1of 1

Vectors

Matrix * Matrix

Each cell (row, col) in AB is:

P

n

Wherehn is dimensionality

ih

iof matrix.

h

i

a b

e f

ae + bg af + bh

AB =

=

c d

g h

ce + dg cf + dh

i=1

Vector Addition

The sum of 2 vectors completes the triangle.

1

0

0

0

also a = c b and b = c a

Used to represent a direction or normal. Length of 1.

~

= A

A

~

||A||

~

Where ||A||

Can be used

Pn to get the angle between 2 vectors.

~B

~ =

A

A B = A1 B1 + A2 B2 + + An Bn

i=1 i i

B)

= arccos(

~ B

~

A

~

~ )

||A||||

B||

Produces a vector perpendicular to the plane containing the 2

vectors.

Matrix Determinant

For a 2x2 or 3x3 matrix use the Rule of Sarrus; add products of

top-left to bottom-right diagonals, subtract products of opposite

diagonals.

#

"

a b c

d e f

Its determinant |M | is:

M =

g h i

|M | = aei + bf g + cdh ceg bdi af h

For 4x4 use Laplace Expansion; each top-row value * the 3x3 matrix

made of all other rows and columns:

|M | = aM1 bM2 + cM3 dM4

See http://www.euclideanspace.com/maths/algebra/matrix/

functions/determinant/fourD/index.htm

Matrix Transpose

Flip matrix over its main diagonal. In special case of orthonormal

xyz matrix then inverse is the transpose. Can use to switch

between

" row-major

# and column-major

"

# matrices.

a b c

a d g

d e f

b e h

M =

MT =

g h i

c f i

"

"

"

a1

b1

a2 b3 a3 b2

a2

b2

a3 b1 a1 b3

=

a3

b3

a1 b2 a2 b1

To compute surface normals from 2 edges:

N = normalize (cross (A, B));

Matrices

Identity Matrix

All 0,"except the top-left

to bottom-right diagonal.

#

1 0 0

0 1 0

I3 =

0 0 1

if AB = I then A is the inverse of B and vice versa.

Matrix

* Vector

"

#" #

a

d

g

b

e

h

c

f

i

x

y

z

"

=

ax + by + cz

dx + ey + f z

gx + hy + iz

Commonly

used in OpenGLmaths

libraries

Vx

Xx Yx Zx Tx

Xy Yy Zy Ty Vy

v0 =

Vz

Xz Yz Zz Tz

1

0

0

0

1

Matrix Inverse

Use an inverse matrix to reverse its transformation, or to

transform relative to another object.

M M 1 = I Where I is the identity matrix.

If the determinant of a matrix is 0, then there is no inverse. The

inverse can be found by multiplying the determinant with a large

matrix of cofactors. For the long formula see

http://www.cg.info.hiroshima-cu.ac.jp/~miyazaki/

knowledge/teche23.html

Use the transpose of an inverse model matrix to transform

normals: n0 = n(M 1 )T

Homogeneous Matrices

Row-Order Homogeneous Matrix

Commonly used in Direct3D

maths libraries

Xx Xy Xz 0

Yx Y y Yz 0

0

v = Vx Vy Vz 1

Zx Zy Zz 0

Tx

Ty

Tz 1

0 0

1 0

column order T =

0 1

0 0

1

0

0

0 cos() sin()

Rx =

0 sin()

cos()

0

0

0

cos()

0 sin()

0

1

0

Ry =

sin() 0 cos()

0

0

0

cos() sin() 0

sin()

cos()

0

Rz =

0

0

1

0

0

0

View Matrix

Sx

0

Tx

0

Sy

Ty

S=

0

0

Tz

0

0

1

0

0

(column-order)

0

1

0

0

(column-order)

0

1

0

0

(column-order)

0

1

0

0

Sz

0

0

0

0

1

Rx

Ry

Rz

Px

Ux

Uy

Uz

Py

(column-order)

V =

Fx Fy Fz Pz

0

0

0

1

Where U is a vector pointing up, F forward, and P is world position

of camera.

1 0

0

0

0 0 1 0

Birds-eye view V =

0 1

0

0

0 0

0

1

Projection Matrix

Sx

0

0

0

0

Sy

0

0

P =

(column-order)

0

0

Sz Pz

0

0

1

0

Sx = (2 near)/(range aspect + range aspect)

Sy = near/range

Sz = (f ar + near)/(f ar near)

Pz = (2 f ar near)/(f ar near)

range = tan(f ov/2) near

revision 4. 5 Oct 2012

Dr Anton Gerdelan, apg@scss.tcd.ie, Trinity College Dublin, Ireland.

LATEX template from http://www.stdout.org/winston/latex/

Thanks Micha

el, Amoss, and Veronica!

- floyds algorithmUploaded byYash Sharma
- A STUDY ON THE PROBLEMS FACED BY RURAL TAMIL MEDIUM STUDENTS IN PROFESSIONAL ENGINEERING COLLEGE USING CETD MATRIXUploaded byIntegrated Intelligent Research
- PU 4 YEARS BBA I Semester SyllabusUploaded byhimalayaban
- Skills MatrixUploaded bynehis1310
- std.pdfUploaded bylanguage hub
- Section 3.2 Properties of DeterminantsUploaded byxxambertaimexx
- Spatial ModelerUploaded byapi-3788255
- Transformation of AxesUploaded byaviatoranu
- Act 4_Vector Addition and the Force Table_repairedUploaded byAllan Roy Elnar
- Fin TermUploaded byJesse Lyons
- Determinants matrices algebraUploaded byborluc
- MatrixUploaded byDeny Doank
- Coordinate Transformation Based Contour Following Control for Robotic SystemsUploaded bybijjukiran
- Geometry Concepts.txtUploaded byladder91
- nn01.pdfUploaded byChiều Tàn
- EE-SEMESTER-I-VIII-HPTU-SYLLABUS.pdfUploaded byAnonymous HGD9CHZ
- HomeworkSolutionsF05.pdfUploaded bySteven KaEne
- A Generalized Optimal Sensor Placement Technique for Structural Health Monitoring and System Identification 2014 Procedia EngineeringUploaded byalkhiat
- MATH1902 - Course OutlineUploaded byRoy Lin
- 19matrices DeterminantsUploaded bysatyahbhat
- 2.Vectors NotesUploaded byggmmnmcncnnm
- Linear AlgebraUploaded byEdmond Z
- Chapter_2_and_3_10.pdfUploaded byShoshAlmazroeui
- A-Generalized-Optimal-Sensor-Placement-Technique-for-Structural-Health-Monitoring-and-System-Identification_2014_Procedia-Engineering.pdfUploaded byalkhiat
- 4-47-nabiUploaded byEngr Rizwan Khattak
- Leydesdorff y Rafols (2012) Global Journal MapsUploaded byprocopiodelllano
- IJET-V4I3P93.pdfUploaded byInternational Journal of Engineering and Techniques
- Ws2a Vec MatUploaded bykhicom
- cs229-linalg.pdfUploaded byhảo nguyễn
- Matrix Equation in Multivariable ControlUploaded byReta Jibat

- Solution of Discretized EquationsUploaded bySandeep Kadam
- Greatest and Least Integer FunctionsUploaded byAbhishek Singh
- Irrestible IntegralsUploaded byHash Nuke
- Pure 3Uploaded byJasgeo
- Mod DecompUploaded byJames Brown
- 03004-03006-03007 S1-Complex Analysis and Numerical Methods-QPUploaded byAnonymous Qnf6YdFX
- OverlapUploaded byNghia Duong
- Complete Calculus CourseUploaded byhalefom558
- Ejer Cici OsUploaded byJoseMiguel
- Tutorial 7(Test Solutions)Uploaded byFabian Molina
- notes100-ch3Uploaded bysfluk2
- NumPy for MATLAB UsersUploaded byvladadj_1603
- test2solUploaded byaltwirqi
- Degree of Smooth MapsUploaded byRana Mehmood
- A Short Introduction to Method of Steepest DescentUploaded byNadeem Al-Shawaf
- Objective Ch 3 FSC Part1 ImranUploaded byAngelic Shine
- 4_2a.pdfUploaded bynick
- Computer GraphicsUploaded bysadhanamca1
- Exponential and Logarithmic_seriesUploaded byAnonymous 35oTubBc8
- Abstract Algebra (Herstein 3rd Ed)Uploaded bySanjay Mohanty
- MatLab ManualUploaded byluisgama22
- 0902.1328Uploaded byMohamed Latifi
- Putnam AnalUploaded byMoises Sanchez
- Poles and Zeros of Network FunctionsUploaded byDina Garan
- Definir y Comparar Matrices ALG II SPN l v3 n46 s1Uploaded bygerardodoac
- Equations and Systems of Equations (Linear and Nonliner) With MathematicaUploaded bynadamau22633
- Question Bank of Nag Rai DspUploaded bysnehilj_1
- S241 Lecture 22Uploaded byCarlos Alban
- 1975 ReinerUploaded byshbunder
- 1_3.pdfUploaded bymimahmoud

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.