I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 2.74
sub units 0.00
+
0
MathsGeometry

pythgen

Pythagoras Generalized Theorem implementation
Controller: lariev

Interface

C++

Overview

The aim of this module is to implement Pythagoras Generalized Theorem. Given any triangle knowing the value of two sides and the angle between them, one can find out the value of the third side.

MISSING IMAGE!

21303/triangle_2.png cannot be found in /users/21303/triangle_2.png. Please contact the submission author.

According to Pythagora's Generalized Theorem the value of AC side is:

This can easily be proven using normal Pythagoras Theorem in the ADC triangle: However, and

Thus, using the last three equations: which is

Example 1

#include <stdio.h>
#include <codecogs/maths/geometry/pythgen.h>
 
int main()
{
    //an equal-sided triangle with the side value of 3.5 
    double thirdSide = pythgen_PythagorasGen(3.5,3.5,60);
 
    printf("\nThe value of the 3rd side: %.2lf", thirdSide);
 
    return 0;
}

Output

The value of the 3rd side: 3.50

Pythgen SetAngleDegRad

 
doublepythgen_SetAngleDegRadconst doublealpha )

Parameters

alphavalue of angle measured in degrees

Returns

value of angle measured in radians

Authors

Victor Larie (May 2010)
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.


Pythgen PythagorasGen

 
doublepythgen_PythagorasGenconst doublex
const doubley
const doublealpha )

Parameters

xthe value of one side of the triangle
ythe value of another side of the triangle
alphathe value of the angle between the sides given in degrees

Returns

the value of the third side of the triangle

Authors

Victor Larie (May 2010)
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.