• 13
• 12
• 9
• 10
• 13

# Trigonometry/ right triangles question

This topic is 4262 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I know this is probably very basic math for anyone remotely associated with computer programming, but its been a while since I had any sort of math class. I wanted to start on an OpenGL book, but I realize that my math skills are extremely lacking. Unfortunately the highest level math class I have had was college algebra and that was 4 years ago. I am a Spanish major and obviously there isnt much math required for the degree. Until today I didnt even have a clue what sin/cos was... :| Anyway, I want to be able to calculate the sin/cos of an angle, which I can now do if I know the lengths of the triangle, but my problem is that I dont know how to find the missing sides if it isnt laid out for me in some example or something. Can someone tell the equation I need to learn about to do this or just simply point a lost newbie in the right direction? I have been reading a lot today and catching up, but I still have a long way to go. Actually I might just be confusing myself. :P Thanks

##### Share on other sites
Your needing the Pythagorean Theorem: a^2 plus b^2 = c^2
with a,b,c being the three sides of a right triangle.
If you have any two sides you can find the third:
if you have a and c then b = square root of c^2 - a^2

##### Share on other sites
This is a right-angled triangle. For other triangles we need more complex stuff.            |O(pposite)  | across from |  \ H(ypotenuse): the long side opposite the right angle.the theta   |   angle.      |___/\ <-- THIS IS THE ANGLE ("theta") WE ARE INTERESTED IN              ^           A(djacent): next to the angle, and not the hypotenuse.

SOHCAHTOA: sin(theta) = O/H, cos(theta) = A/H, tan(theta) = O/A.

Pythagorean theorem: O*O + A*A = H*H.

As for actually *calculating* a sin or cos value - you can't write them out exactly; they're real numbers. Existing formulae for approximating them are difficult to follow by hand. This is why we have computers to do them for us :)

##### Share on other sites
Trig
Triangles

There are many different forms of formulas for use on triangles. Whichever one you end up using depends on the minimum amount of information that you currently have about the triangle which you then plug into formulas to find out the rest of the information (angles, length of sides) for the specific triangle.

My guess from what you described is you will end up using trig identities such as

sin = opp/hyp

##### Share on other sites
sohcahtoa is what I learned in math class for helping with trig. It was and still maybe a brilliant tool for the beginner triggers out there :-)

s=o/h c=a/h t=o/a