UChicago CMSC 23320 - The Best Commit Messages of 2024
Applications of Linear Algebra in term of computer science
1. COMPUTER GRAPHFICS (INTRODUCTION)
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.
2. 2-DIMENSIONAL GRAPHFICS
• Examples 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. 3-DIMENSIONAL GRAPHICS
• 3-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:
5. SCALING IN 2-DIMENSIONS
• The scaling transformation is given by the matrix S= • The
transformation is given by the multiplication of the
matrices S and A:
6. SCALING IN 3-DIMENSIONS
The scaling transformation is given by the matrix S
The transformation is given by the multiplication of the matrices
S and A:
7. TRANSLATION
• Translation is moving every point a constant distance in a specified direction. The origin of the
coordinate system is moved to another position but the direction of each axis remains the
same.
• Translation in 2-Dimensions :Mathematically 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-Dimensions : Mathematically speaking we can represent the 3-
Dimensionaltranslation 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.
8. ROTATION
A more complex transformation, rotation changes the orientation of the image about some axis.
The coordinate axes are rotated by a fixed angle θ about the origin. The post-rotational
coordinates of an image can be obtained by multiplying the rotation matrix by the data matrix
containing the original coordinates of the image.
• Rotation in 2-Dimensions : Counter-Clockwise Rotation Matrix and Clockwise Rotation
Matrix.
• Rotation in 3-Dimensions : Rotation about the x-axis, Rotation about the y-axis and Rotation
about the z-axis.
9. HOMOGENEOUS COORDINATES
• Homogeneous coordinates are a system of coordinates used in projective
geometry.
• They have the advantage that the coordinates of a point, even those at
infinity, can be represented using finite coordinates. Often formulas involving
homogeneous coordinates are simpler and more symmetric than their
Cartesian counterparts.
10. HOMOGENEOUS COORDINATES
Each point (x, y) that lives in R2 has homogeneous coordinates (x, y, 1) . Each
point (x, y, z) that lives in R3 has homogeneous coordinates (x, y, z, 1) . (X, Y, H)
are homogeneous coordinates for (x, y) and (X, Y, Z, H) are coordinates for (x, y,
z)
x = X/Z y = Y/H z = Z/H