Game Development Reference
In-Depth Information
You can easily remember which is which because they are in alphabetical
order: x comes before y, and cos comes before sin.
The secant, cosecant, tangent, and cotangent are also useful trig func-
tions. They can be defined in terms of the the sine and cosine:
1
cosθ ,
tanθ = sinθ
secθ =
cosθ ,
1
sinθ ,
tanθ = cosθ
1
sinθ .
If we form a right triangle using the rotated ray as the hypotenuse (the
side opposite the right angle), we see that x and y give the lengths of the
legs (those sides that form the right angle). The length of the adjacent leg
is x, and the length of the opposite leg is y, with the terms “adjacent” and
“opposite” interpreted relative to the angle θ. Again, alphabetical order
is a useful memory aid: “adjacent” and “opposite” are in the same order
as the corresponding “cosine” and “sine.” Let the abbreviations hyp, adj ,
and opp refer to the lengths of the hypotenuse, adjacent leg, and opposite
leg, respectively, as shown in Figure 1.18.
cscθ =
cotθ =
Figure 1.18
The hypotenuse and the adjacent and
opposite legs
The primary trig functions are defined by the following ratios:
cosθ = adj
sinθ = opp
tanθ = opp
hyp ,
hyp ,
adj ,
secθ = hyp
cscθ = hyp
cotθ = adj
opp .
Because of the properties of similar triangles, the above equations apply
even when the hypotenuse is not of unit length. However, they do not
adj ,
opp ,
Search WWH ::




Custom Search