# Triangle solution with less trig

This topic is 4313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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?

1. 1
2. 2
Rutin
22
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631776
• Total Posts
3002299
×