## 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:

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:

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

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).

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).

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.

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:

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

## Leave your response!