A Triangle Solver

Topics: Core Library Development
Coordinator
Oct 16, 2012 at 9:30 PM

Hi Team,

Recently, I got a thought about a Triangle Solver module. The purpose of it is to given any angle and some sides, it will calculate the missing information.

For example, I have two sides and one angle, but want to get the third side -> it applies the cosine rule. Or, side or an angle given, and it will apply any appropriate method, to calculate the missing angles and sides.

Who would like to develop this module? :P

Could you please reply to this thread, if you have started on developing it!

Developer
Oct 17, 2012 at 7:04 AM
Edited Oct 17, 2012 at 7:06 AM

Hi,

       Does it have to be a separate module. If its purpose is to complete triangle information, a simple function is enough, which can be added to the trigonometry module or directly implemented in triangle.cs(in Mathos/Geometry/Shapes) that defines a triangle. I could be wrong if you're planning to add more to the module.

I can work on this, need to know how the parameters will be taken by the function.

Developer
Oct 17, 2012 at 7:05 AM
Edited Oct 17, 2012 at 7:07 AM

a

Coordinator
Oct 17, 2012 at 8:54 PM

Hi,

You are entirely right, it should be implemented in the already existing Triangle Module. As it is now, the Triangle class has three constructors, two of them require a side and a height, or all sides of a triangle. However, if we would change it a bit, and allow it to take in angles as well, then it would allow a user to create a Triangle, given some information about it.

The parameters will therefore be taken in through one of the constructors, and they should also be optional, I suppose. :)

Developer
Oct 18, 2012 at 11:01 AM

Alright, will be done latest by Friday night, i have got to cram for a test tomm ... :(

Coordinator
Oct 18, 2012 at 6:46 PM
Edited Oct 18, 2012 at 6:46 PM

Good luck on the test tomorrow! :)

Coordinator
Oct 22, 2012 at 8:39 PM
Edited Oct 22, 2012 at 8:44 PM

The triangle solver looks great! Please take a look at the online version of it: http://labs.mathosproject.com/Module/Triangle.aspx

It would be really awesome if we could somehow add the area of a triangle as an input parameter as well! :P