## Sine, Cosine, and Tangent

In trigonometry, we have three functions that we commonly use: Sine, Cosine, and Tangent. In your 3D application, you’ll usually use them in an expression or part of a script like this:

$a = \sin(angle)$
$b = \cos(angle)$
$c = \tan(angle)$

Most people are introduced to these functions when trying to find side lengths or angles of right-angled triangles. The diagram below shows one such triangle. The corner marked with a square is at 90º (a right-angle):

The sides are labelled with names. The one next to the angle marked θ is always called the “Adjacent” side, the one opposite is always called the “Opposite” side. Why do this? Well, it lets us specify a relationship between the angle θ and two of the sides:

$\sin(\theta) =$ $\frac{Opposite}{Hypotenuse}$
$\cos(\theta) =$ $\frac{Adjacent}{Hypotenuse}$
$\tan(\theta) =$ $\frac{Opposite}{Adjacent}$

The most common way to remember these relationships is to use the following nemonic:￼

$"Soh\ Cah\ Toa"$

It should be obvious how to use this, but if not, just look at the first letters of the words of the equations above and compare.

Let’s take the very simple case below where the Adjacent and Opposite edges are the same length, in this case, 10.

We can see that the angle is 45º. Putting 45º into a calculator and pressing the “tan” button, will give you an answer of 1 (if it doesn’t, then you’ve not got it in “degrees” mode). That’s obviously correct, because the Adjacent side length divided by the Opposite side length is 1 as they’re the same length (10/10=1).

$\tan(45^{\circ}) = \frac{10}{10} = 1$

If we didn’t have the angle, then we can use the inverse tangent to find it for us. Typing 1 on a calculator, pressing the “Inv” button and then pressing the “Tan” button should give you the result of 45º (again, if it doesn’t, then you’re not in “degrees” mode).

$\arctan(1) = 45^{\circ}$

The arctan function is the inverse of the tan function. Effectively, it’s the undo function of the “tan” function (see note on trigonometric power notation below).

The Sine and Cosine functions operate in a very similar way. In the above example, we can use either function to find the length of the missing side.

$\cos(45^{\circ}) = \frac{10}{hypotenuse}$
$0.7071 = \frac{10}{hypotenuse}$

$hypotenuse = 14.14$

There are a few specially proportioned right-angled triangles that have whole numbers for side lengths, the smallest is the 3,4,5 triangle:

No particular reason I’m showing this triangle except it makes the numbers easier to write. So for clarity, here are the relationships between the angles, side lengths, and the three trigonometric functions for this triangle:

$\sin(36.87^{\circ}) = \frac{3}{5}$       $\sin(53.13^{\circ}) = \frac{4}{5}$
$\cos(36.87^{\circ}) = \frac{4}{5}$       $\cos(53.13^{\circ}) = \frac{3}{5}$
$\tan(36.87^{\circ}) = \frac{3}{4}$       $\tan(53.13^{\circ}) = \frac{4}{3}$

By looking at these results and the original “SohCahToa” formulae, you should be able to confirm that:

$\tan \theta = \frac{\sin \theta}{\cos \theta}$

Back up to Trigonometry

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.