Welcome, Guest. Please login or register.

Author Topic: A trigonometry question  (Read 4170 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
A trigonometry question
« 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!



Assuming you know the lengths of sides x and y, how would you calcualate angle a?

TIA

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Cass

  • Hero Member
  • *****
  • Join Date: Apr 2003
  • Posts: 826
  • Country: 00
    • Show only replies by Cass
Re: A trigonometry question
« Reply #1 on: August 15, 2007, 07:40:31 PM »
tanA=y/x

You get a value and then check a Trigonometric Table ;-)
"If we don't got it, you don't want it!"
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: A trigonometry question
« Reply #2 on: August 15, 2007, 08:13:10 PM »
Thanks! Do you know which C trigonometry function will convert the result of y/x to an angle?

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline motorollinTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: A trigonometry question
« Reply #3 on: August 15, 2007, 08:20:42 PM »
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
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Doobrey

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: A trigonometry question
« Reply #4 on: August 15, 2007, 09:19:59 PM »
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.
On schedule, and suing
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: A trigonometry question
« Reply #5 on: August 16, 2007, 10:46:21 AM »
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...
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: A trigonometry question
« Reply #6 on: August 16, 2007, 04:38:15 PM »
Sid On His Camel Always Had The Ointment Afterwards
int p; // A
 

Offline A4000_Mad

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 1392
    • Show only replies by A4000_Mad
Re: A trigonometry question
« Reply #7 on: August 16, 2007, 07:21:04 PM »
Some Officers Have Curley Auburn Hair To Offer Attraction

For some reason that's the one my grandad taught me :lol:
A4000 Mad
 

Offline JaXanim

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1120
    • Show only replies by JaXanim
    • http://www.intuitionbase.com/waveguide/home.html
Re: A trigonometry question
« Reply #8 on: August 16, 2007, 07:26:38 PM »
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
Be inspired! It\\\'s back!
 

Offline Boot_WB

  • Hero Member
  • *****
  • Join Date: Feb 2005
  • Posts: 1326
    • Show only replies by Boot_WB
    • http://www.hullchimneyservices.co.uk
Re: A trigonometry question
« Reply #9 on: August 16, 2007, 11:10:00 PM »
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.
Mac Mini G4 (1.5GHz, 64MB VRam, 1GB Ram): MorphOS 3.6
Powerbook 5.8 (15", 1.67GHz, 128MB VRam, 1GB Ram): MorphOS 3.8.

Windows-free since 2011-2014 (Damn you Netflix!)
 

Offline Dandy

  • Hero Member
  • *****
  • Join Date: Apr 2004
  • Posts: 1221
    • Show only replies by Dandy
    • http://www.wiehltalbahn.de/en/
Re: A trigonometry question
« Reply #10 on: August 17, 2007, 09:01:23 AM »
Quote

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
All the best,

Dandy

Website maintained by me

If someone enjoys marching to military music, then I already despise him. He got his brain accidently - the bone marrow in his back would have been sufficient for him! (Albert Einstein)
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show only replies by Cymric
Re: A trigonometry question
« Reply #11 on: August 17, 2007, 12:12:47 PM »
Quote
@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.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.