Triangle solution with less trig

Recommended Posts

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.

Share on other sites
(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

RRRR y1 is unknown :( /me hides

Share on other sites
Dope, thank you for your second and third point. Can't believe I missed that. Anyone else have any further optimizations?

Share on other sites
Angle9 = 150 - arctan(abs(y1-200) / 20);

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

Share on other sites
@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.

Share on other sites
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.

Share on other sites
Quote:
 Original post by erissianIf 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

Share on other sites
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.

Share on other sites
Thanks for all the input guys!! I'm off to implement!!

Share on other sites
Quote:
 Original post by NypyrenAngle9 = 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?

Share on other sites
Quote:
 Original post by smcI just don't see where the 150 is comming from. I would think: Ang9 + Ang7 = 180 - arctan(abs(y1-200) / 20)

Yep, that's true too. Nypyren has just substitued the value of 7 in (it's 30) and subtracted it from each side. Before that it's equivalent to yours.

Regards

Create an account

Register a new account

• Forum Statistics

• Total Topics
627762
• Total Posts
2978971

• 11
• 10
• 10
• 23
• 14