Chapter 18: Matrix Math

Overview

What well cover in this chapter:

  • Matrix basics

  • Matrix operations

  • The Matrix class in Flash 8

In this chapter, Im not necessarily going to introduce any new types of motion or physics or methods of rendering graphics. What I am going to do is give you an introduction to matrices , which provide an alternative way of doing a lot of the things youve already been doing.

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. You might recall that the beginGradientFill movie clip method uses a matrix to position, size , and rotate the gradient. Flash 8 makes more frequent use of matrices in many of its new functions.

In this chapter, youll see how to create a system of 3D matrices to manipulate movie clips in 3D and look into several built-in uses of matrices in Flash. Oh, and Im quite proud of myself for not having made a single corny reference to any Keanu Reeves movie yet. Lets see how long I can restrain myself .



Foundation ActionScript. Animation. Making Things Move
Foundation Actionscript 3.0 Animation: Making Things Move!
ISBN: 1590597915
EAN: 2147483647
Year: 2005
Pages: 137
Authors: Keith Peters

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net