These are some equations you can use to calculate Sides and Angles of triangles. Correctly used, one may solve the entire triangle with just a few sides and angles.
vb Code:
#Region " Sines "
Private Function FindSineAngle(ByVal Side1 As Double, ByVal Side2 As Double, ByVal Angle As Double) As Double
These are some equations you can use to calculate Sides and Angles of triangles.
Could you use some more decriptions on what value is meant to be what part of a triangle and if an angle is in radians or degree. I'd use the standard triangle-nomination (A, B, C for points, a, b, c for lines ....)
Originally Posted by JuggaloBrotha
These functions yes, the others would not because because of the IF statements, are we still using those?
What IF statements, the OP didn't use any and why shouldn'T we use them anymore? I can'T think of doing code WITHOUT an IF!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
Private Function FindSineAngle(ByVal Side1 As Double, ByVal Side2 As Double, ByVal Angle As Double) As Double
Return RadianToDegree(Math.Asin((Side1 / Side2) * (Math.Sin(DegreeToRadian(Angle)))))
End Function
I don't see any a,b,c only Side1 and Side2, which angle is Angle then, the one between Side1 and Side2 or what.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
It's a generic equation, it takes two sides. you decide if you give it b and c, a and c, or b and c, and it will return appropriate angle.
But which angle is the "appropriate" one? The angle that is formed between Side1 and Side2 or one of the two others, you were talking of a triangle, like three angles.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!
But if a "district certified teacher" looked it over, it HAS to be correct.
However I don't get any clue.
Can you at least look at the source? If you can examine the source, you can see how each angle and side is determined. The equations are just modified forms of the Laws of Sine and Laws of Cosine. I modified them to work in the program.
That type of IF statement only works in VS2008. We were using it at one point and I was just verifying that before adam (formlesstree4) states that it'll work in VS2005 and 2008.
Originally Posted by opus
I don't see any a,b,c only Side1 and Side2, which angle is Angle then, the one between Side1 and Side2 or what.
That part could be changed to make it more obvious, but in short:
Angle1 is equivalent to A
Angle2 is equivalent to B
Angle3 is equivalent to C
Side1 is equivalent to a
Side2 is equivalent to b
Side3 is equivalent to c
In code, for me, it's easier to identify it as 'Side1' instead of 'a'
Originally Posted by opus
Attached project not running for me :-((
But if a "district certified teacher" looked it over, it HAS to be correct.
However I don't get any clue.
His teacher says it works, I haven't asked a math person to test it on my end yet, but if you do use the functions here it's still common sense to either test them yourself or have someone else test them for you.
Currently using VS 2015 Enterprise on Win10 Enterprise x64.
That type of IF statement only works in VS2008. We were using it at one point and I was just verifying that before adam (formlesstree4) states that it'll work in VS2005 and 2008.
I assume it would, because the code does compile to the 2.0 framework..but then again, that never means something automatically works.
hi i want to know how to get the third point of a triangle..
i have point A and point B and the Length of all sides.
now i need to get Point C by using an offset from A.. but only by using the lengths of ab, bc and ac.
here is an example:
it needs to be a function which is given the lengths of the lines and returns the offset.
also it doesnt matter if the x of offset is more/less than ab.
thanks.