HTML and CSS Reference
In-Depth Information
Chapter 18
Matrix Math
What we'll cover in this chapter:
Matrix basics
Matrix operations
Canvas transforms
Although this chapter does not introduce any new types of motion or methods of rendering graphics, it
does introduce matrices, which provide an alternative way of applying visual transformations, something
we've done throughout the topic.
Matrices are used quite often in 3D systems for rotating, scaling, and translating (moving) 3D points. They
are also used quite a bit in various 2D graphics transformations. In this chapter, you see how to create a
system of matrices to manipulate objects and look at several methods built into the canvas that are used to
work with matrices.
Matrix basics
A matrix, by simplest definition, is a grid of numbers. It can have one or more horizontal rows and one or
more vertical columns. Figure 18-1 shows some matrices.
 
Search WWH ::




Custom Search