Home / Articles / Flash Game Design: Trigonometry 101

Flash Game Design: Trigonometry 101

Chapter Description

Brush up on the basics of trigonometry, which should handle almost every Flash game development need you'll have.

Anatomy of a Triangle

Trigonometry, as I've said, is based on the relationships of the sides of a triangle to its angles. Before we get into the heart of trigonometry, let's refresh your memory on the basics of triangles and how they fit into the coordinate system.

Figure 8

Triangles are made up of three line segments joined in three places. Each of these joints is called a vertex. In a triangle there are three angles, one at each vertex. These three angles must always total 180°. As you may remember from geometry class, there are descriptive names associated with certain types of triangles, such as isosceles, acute, oblique, and right. We are only going to concern ourselves with one of these, the right triangle.

A right triangle is any triangle that has a 90° angle. The right triangle is a very useful tool for us, because two of its sides fit nicely into the Cartesian system we use in Flash—one of them is along the x-axis and another is along the y-axis. (No other type of triangle can claim this!) Because of this, it is generally easier to gain information about the length of its sides. The side of the triangle that is opposite the 90° angle has a special name, the hypotenuse.

Figure 9

4. The Pythagorean Theorem | Next Section Previous Section