# how to use the law of cosine?

Discussion in 'Archived Threads 2001-2004' started by felix_suwarno, Sep 12, 2002.

1. ### felix_suwarno Screenwriter

Joined:
Dec 2, 2001
Messages:
1,523
0
Trophy Points:
0
i have a triangle. side a=3. side b=4. side c=2.1 ( this one is on the opposite side of theta ).

the formula is

cos theta = ( (a*a) + (b*b) - (c*c) ) / (2ab)

i got :

cos theta = 0.8579166667

now how to get the angle of theta?? i tried to do arc cos using my calculator, but the result is 0.5395954398

i KNOW that the angle of theta should be 30.05 degree ( according to my protractor ).

how to get 30.05 out of that calculation? is my calculator calculating the numbers in radian?

btw this is for a comp graphics class

2. ### NickSo Producer

Joined:
Jul 2, 2000
Messages:
4,260
0
Trophy Points:
0
Real Name:
Nick So
Yeah, it looks like the resulting answer is in rads. I just checked what 30.05 in rads was, it was .52447144, pretty similar to what you got on the second answer...

EDIT: Okay, i got it... I think, its not exact though. The answer was 30.92

the formula i used was c^2=(a^2)+(b^2)-2(a)(c)cosC (i htink your formula is the same, just written differently.

I came up with:
2.1^2=(4^2)+(3^2)-2(4)(3)cosC
2(4)(3)cosC = (16)+(9)-(4.41)
24(cosC) = 20.59
cosC = 20.59/24

then i used cos^-1 on my calculator, and found 30.91653504

3. ### Wayne Bundrick Cinematographer

Joined:
May 17, 1999
Messages:
2,358
0
Trophy Points:
0
I got 30.92 degrees.

4. ### felix_suwarno Screenwriter

Joined:
Dec 2, 2001
Messages:
1,523
0
Trophy Points:
0
ahhh thanks for fast response. but how do i convert rad to degree?

5. ### NickSo Producer

Joined:
Jul 2, 2000
Messages:
4,260
0
Trophy Points:
0
Real Name:
Nick So
Well on my calculator, if you're in Degree mode, just type n the degree, and when you swithc to rads, itll display the degrees in Rads (mine's a SHARP).
But to do it the long way, you take the degrees, multiply by Pi, and then divide by 180:
[c]30.92(Pi)
180[/c]

6. ### Gary King Second Unit

Joined:
Apr 13, 1999
Messages:
479
0
Trophy Points:
0
Or you could do it the hard way and use a Taylor series to approximate acos (which is all the calculator is doing, anyway).

I'd recommend you forget degrees exist and learn to use radians almost exclusively. Most graphics (and physics) equations that deal with angles will require radians.

7. ### felix_suwarno Screenwriter

Joined:
Dec 2, 2001
Messages:
1,523
0
Trophy Points:
0
ok for all of you, big thanks.

8. ### John_Berger Cinematographer

Joined:
Nov 1, 2001
Messages:
2,489
0
Trophy Points:
0
Boy, do I feel inadequate. I didn't understand a freakin' thing that was said.
**sigh*

Joined:
Jul 2, 2000
Messages:
4,260