7
Computer Graphics : Linear Algebra Created By- Mydul Islam

Computer Graphics

Embed Size (px)

Citation preview

Page 1: Computer Graphics

Computer Graphics : Linear AlgebraCreated By- Mydul Islam

Page 2: Computer Graphics

Linear AlgebraLinear algebra is the branch of mathematics concerning vector spaces and linear mappings between such spaces. It includes the study of lines, planes, and subspaces, but is also concerned with properties common to all vector spaces. There are much more application in Linear Algebra. Computer Graphics in the one of Team.

In the simplest sense computer graphics are images viewable on a computer screen. The images are generated using computers and likewise, are manipulated by computers. Underlying the representation of the images on the computer screen is the mathematics of Linear Algebra.

Page 3: Computer Graphics

2-Dimensional Computer GraphicsExamples of computer graphics are those of which belong to 2 dimensions. Common 2D graphics include text. For example the vertices of the letter H can be represented by the following data matrix D:3-Dimensional Computer Graphics3-Dimensional graphics live in R3 versus 2-Dimensional graphics which live in R2. 3-Dimensional graphics have a vast deal more applications in comparison to 2-Dimensional graphics, and are, likewise, more complicated. We will now work with the variable Z, in addition to X and Y, to fully represent coordinates on the X, Y, and Z axes, or simply space. For example we can represent a cube with the following data matrix D:

Page 4: Computer Graphics

Scaling in 2-DimensionsThe scaling transformation is given by the matrix S=

The transformation is given by the multiplication of the matrices S and A: = = Scaling in 3-DimensionsIn 3-Dimensions, scaling moves the coordinates (X,Y,Z) to new coordinates (C1, C2, C3) where the Ci’s are scalars. Scaling in 3-Dimensions is exactly like scaling in 2-Dimensions, except that the scaling occurs along 3 axes, rather than 2.

Note that if we view strictly from the XY-plane the scaling in the Z-direction can not be seen, if we view strictly from the XZ-plane the scaling in the Y-direction can not be seen, and if we view strictly from the YZ-plane then the scaling in the X-direction can not be seen.

XY-plane

XZ-plane

YZ-plane

Page 5: Computer Graphics

Translation in 2-DimensionsMathematically speaking translation in 2-Dimensons is represented by:

Where e1 and e2 are the first two columns of the Identity Matrix, and X0 and Y0 are the coordinates of the translation vector T.

Translation in 3-DimensionsMathematically speaking we can represent the 3-Dimensional translation transformation with:

Where e1, e2, and e3 are the first three columns of the Identity Matrix, and X0,Y0, & Z0 are the coordinates of the translation vector T.

Page 6: Computer Graphics

Rotation in 2-Dimensions• Counter-Clockwise Rotation Matrix:

• Clockwise Rotation Matrix:

Rotation in 3-Dimensions

• Rotation about the x-axis:

• Rotation about the y-axis:

• Rotation about the z-axis:

Page 7: Computer Graphics

Thank You