Amiga.org
Coffee House => Coffee House Boards => CH / Science and Technology => Topic started by: motorollin on August 15, 2007, 07:03:29 PM
-
I have done some reading on trigonometry (at least I think that's what I need) but I still can't work this out!
(http://i298.photobucket.com/albums/mm244/motorollin/aorg/triangle.jpg)
Assuming you know the lengths of sides x and y, how would you calcualate angle a?
TIA
--
moto
-
tanA=y/x
You get a value and then check a Trigonometric Table (http://math2.org/math/trig/tables.htm) ;-)
-
Thanks! Do you know which C trigonometry function will convert the result of y/x to an angle?
--
moto
-
Never mind, I have just found out that the language I'm using has a direction() command which calculates the angle in degrees between two points, which is exactly what I'm trying to do. Thanks anyway Cass.
--
moto
-
There's 2 things I always remember from maths lessons at school
1. Don't offend the teacher by mentioning her hairy legs.
2. The 'SOH CAH TOA' rule
Sine(a)=Opposite/Hypotenuse
Cosine(a)=Adjacent/Hypotenuse
Tangent(a)= Opposite/Adjacent
Looking at your diagram,since you know x=adjacent, y=opposite, so you can calculate the tangent. From that, you can calculate the angle by using the inverse tangent function (also called arc tangent)
angle=atan(y/x);
Dunno what language you're using, but in C the atan() result is in radians, so you have to multiply the result by (180/PI) to convert to degrees.
-
I can never remember 'opposite' and 'adjacent', so instead I remember by means of a circle with unit radius. Then the sine of an angle is simply it's y-coordinate where it intersects the circle; the cosine the x-coordinate; and the tangent y divided by x, because it should be infinite at x = 0, and that can only happen if you divide by 0. It has the advantage of working in all four quadrants too; the SOH-something rule only works in the first of the four...
-
Sid On His Camel Always Had The Ointment Afterwards
-
Some Officers Have Curley Auburn Hair To Offer Attraction
For some reason that's the one my grandad taught me :lol:
-
Write O A O A H H
Draw a line underneath
Under this, write the letters again backwards H H A O A O
Each ratio reading left to right gives you:
sine, cosine, tangent, cotangent, secant and cosecant
Learned that when I was 12 and will never forget.
Jax
-
Silly Old Harry Caught A Herring Trawling Off Afghanistan
Although nowadays I just remember Sohcahtoa.
@Cymric - I like that, and it fits with my Maths education with the four quadrants. I guess your starting point is x=1, y=0, and your moving anticlockwise (the positive direction).
Incidentally Sohcahtoa only deals with right angled triangles, ergo you would always be within the first quadrant. Anything else and you would have to invoke the sine or cosine rules.
-
Doobrey wrote:
...
2. The 'SOH CAH TOA' rule
Sine(a)=Opposite/Hypotenuse
Cosine(a)=Adjacent/Hypotenuse
Tangent(a)= Opposite/Adjacent
...
Hehe - in German that sounds more funny:
'GAGA'-rule...
Sinus(a) = Gegenkathete/Hypothenuse
Cosinus(a) = Ankathete /Hypothenuse
Tangens(a) = Gegenkathete/Ankathete
Cotangens(a) = Ankathete/Gegenkathete
:-D
-
@Cymric - I like that, and it fits with my Maths education with the four quadrants. I guess your starting point is x=1, y=0, and your moving anticlockwise (the positive direction).
Yes. I should have added the following: 'Position the angle at the origin, with one of its 'legs' positioned on the X-axis. Extend the other 'leg' until it intersects the circle. Then the sine of the angle is the y-coordinate of the intersection point, ...'
And yes, you do move anticlockwise that way. It's rather like the opening of a book, or (even better) a spiral binder.