Top Banner
Mathematics Fundamentals
31

Mathematics fundamentals

Jun 29, 2015

Download

Software

Sardar Alam

Mathematics Fundamental related with Graphics
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Mathematics fundamentals

Mathematics Fundamentals

Page 2: Mathematics fundamentals

Matrix

Page 3: Mathematics fundamentals

Matrix

• A matrix is a collection of numbers arranged into fixed number of rows and columns

• C R

Page 4: Mathematics fundamentals

• Each number that makes up a matrix is called an element of the matrix.

• The element in a matrix have specific location

Page 5: Mathematics fundamentals

• The numbers of rows and columns of a matrix are called its dimensions

• Here it is 4x3

Page 6: Mathematics fundamentals

• 2x3

Page 7: Mathematics fundamentals

Squire matrix

• A matrix with the number of rows==columns• In CG squire matrices are used for

transformation

Page 8: Mathematics fundamentals

Row matrix

• column Matrix

Page 9: Mathematics fundamentals

Notation

• Usually a capital letter in bold face like • A or M• Sometimes as a reminder the dimensions are

written to the right of • the letter as in B3x3

Page 10: Mathematics fundamentals

Location of elements

Page 11: Mathematics fundamentals

• If 2 matrices contain the same No. as elements; are the 2 matrices equal to each other???

Page 12: Mathematics fundamentals

• If 2 matrices contain the same No. as elements; are the 2 matrices equal to each other???

• No, to be equal, must have the same dimensions and must have the same values in the same positions.

Page 13: Mathematics fundamentals

• In other words, say that An x m = [ai j] and that Bp x q = [bi j]

• Then A = B if and only if n=p, m=q, and ai j =bi j for all I and j in range

Page 14: Mathematics fundamentals

Zero matrix

• Which has all its elements zero •

Page 15: Mathematics fundamentals

Adding

• The sum A+B of two m-by-n matrices A and B is calculated entry wise:

• (A + B)i,j = Ai,j + Bi,j, where 1 ≤ i≤ m and 1 ≤ j ≤ n.

Page 16: Mathematics fundamentals

• Do you think that • (A + B) +C = A + (B + C)

Page 17: Mathematics fundamentals

• Do you think that • (A + B) +C = A + (B + C)• Yes

Page 18: Mathematics fundamentals

Scalar multiplication

• The scalar multiplication cA of a matrix A and a number c (also called a scalar in the parlance of abstract algebra) is given by multiplying every entry of A by c:(cA)i,j = c · Ai,j.

Page 19: Mathematics fundamentals

Transpose

• The transpose of an m-by-n matrix A is the n-by-m matrix AT (also denoted Atr or tA) formed by turning rows into columns and vice versa:(AT)i,j = Aj,i.

Page 20: Mathematics fundamentals

• Familiar properties of numbers extend to these operations of matrices

• for example, addition is commutative, i.e., the matrix sum does not depend on the order of the summands: A + B = B + A.

• The transpose is compatible with addition and scalar multiplication, as expressed by (cA)T = c(AT) and

• (A + B)T = AT + BT. • Finally, (AT)T = A.

Page 21: Mathematics fundamentals

• The identity matrix In of size n is the n-by-n matrix in which all the elements on the main diagonal are equal to 1 and all other elements are equal to 0, e.g.

Page 22: Mathematics fundamentals

• It is called identity matrix because multiplication with it leaves a matrix unchanged: MIn = ImM = M for any m-by-n matrix M.

Page 23: Mathematics fundamentals

Vector • Row matrix

• column Matrix

Page 24: Mathematics fundamentals

Vector

• Magnitude and the direction of two connecting points in coordinate system is V

• If P1 = (x1, y1,z1) is Is the starting point and P2=(x2,y2,z2) is the ending point, then the vectorV = (x2-x1, y2-y1, z2-z2)

Page 25: Mathematics fundamentals

Projection in 2D

• Projection of v onto the x-axis

Page 26: Mathematics fundamentals

Projection in 3D

• Projection of v onto the xz plan

Page 27: Mathematics fundamentals

• The magnitude (length) of a vector :

Derived from the Pythagorean theorem

– The direction of the vector:

α is angular displacment from the x-axis

α

Page 28: Mathematics fundamentals

3D

• The magnitude is simple extension of 2D

• Direction:• Needs 2 angles to fully describe directions • Latitude/longitude is a real word example

Page 29: Mathematics fundamentals

• α, β, y are the positive angles that the vector makes with each of the positive cordinate axes x,y and z respectivly

Page 30: Mathematics fundamentals

Normalizing

• Shrinking or stretching it so its magnitude is 1– Creating unit vector– Does not change the direction

• Normalize by dividing on its magnitude:

Page 31: Mathematics fundamentals

• It doesn’t come out to exactly 1, this is bcz of the error using only 2 decimal places