Triangle solution with less trig

Started by
9 comments, last by TheAdmiral 17 years, 6 months ago
Here is a diagram: Now, I want to find 9, the angle. Normally, I would use cosine law with 1, 2, and 3 to find both 4 and 7. Then I would use the pythagorean theorum with 4 and 6 to find 5. Then I would use cosine law with 4, 5, 6 to find 8. Now I would add 8 to 7, and subtract that from 180 to find 9. Is there a better way to do this, using less trig functions. I'm at 3 cos's and 1 square root function. If this is not clear enough, let me know. Thank you.
bi-FreeSoftware
Advertisement
(5) is known: have y1 and y2
(8) = sin (5)/(6); have opp and adj
(7) = 30deg (due to (1) being 120 , (2) and (3) being the same size.

(9) = 180 - (8) - (7)

Or are you looking for an algorithm

[edit]
RRRR y1 is unknown :( /me hides
Dope, thank you for your second and third point. Can't believe I missed that. Anyone else have any further optimizations?
bi-FreeSoftware
Angle9 = 150 - arctan(abs(y1-200) / 20);

// Not clear whether y1 is greater or less than y2 from your diagram.
@Nypyren: y1 is less than y2. Could you please explain the equation you wrote. I am in Grade 11 ATM and have not learned either arctan or abs.
bi-FreeSoftware
If tan(x) = y, then arctan (y) = x.

Also, abs(x) = abs(-x) = x. It's the absolute value, and basically strips the sign off a number.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
Quote:Original post by erissian
If tan(x) = y, then arctan (y) = x.

Sorry to be pedantic, but my tutor would have a fit if he saw that. Perhaps

If arctan(y) = x then tan(x) = y

would be a better statement. My problem is that you'd need a multifunctional definition of atan to avoid the counterexample:

tan(5pi/4) = 1
arctan(1) = pi/4

Your statement is fine so long as you restrict x to the range 0..2pi (or -pi..pi if your arctan works that way).

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
No, don't feel bad for clarifying. He's here for help after all. I just didn't want to throw the ball too far over his head, as it were.
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
Thanks for all the input guys!! I'm off to implement!!
bi-FreeSoftware
Quote:Original post by Nypyren
Angle9 = 150 - arctan(abs(y1-200) / 20);

// Not clear whether y1 is greater or less than y2 from your diagram.


My trig has become rusty. It looks like you are using inclination of a line to find the angle (slope = tan(theta)). I just don't see where the 150 is comming from. I would think: Ang9 + Ang7 = 180 - arctan(abs(y1-200) / 20)


Hint?
∫Mc

This topic is closed to new replies.

Advertisement