#include <codecogs/geometry/area/free_triangle.h>
using namespace Geometry::Area;
| double | free_triangle (double a, double b, double c, double h, double alpha)[inline] Computes the area of a triangle or a trapezium within a triangle with a fixed vertex. | |
| Real | cc_free_triangle (Real a, Real b, Real c, Real h, Real alpha) This function is available as a Microsoft Excel add-in. |
| doublefree_triangle( | double | a | |
| double | b | ||
| double | c | ||
| double | h | ||
| double | alpha | )[inline] |

Further information available when you purchase a licence.
Let
Further information available when you purchase a licence.
2)
Further information available when you purchase a licence.
3)
Further information available when you purchase a licence.
4)
Further information available when you purchase a licence.
Output:a = 2.613 b = 1.878 c = 1.209 alpha = 0.61086 h = 0.0 Area = 0.00 h = 0.3 Area = 0.14 h = 0.6 Area = 0.56 h = 0.9 Area = 0.97 h = 1.2 Area = 1.04 h = 1.5 Area = 1.04
#include <codecogs/geometry/area/free_triangle.h> #include <stdio.h> int main() { // the lengths of the sides double a = 2.613, b = 1.878, c = 1.209; // the value of the alpha angle in radians double alpha = 0.61086; // display the lenghts of the sides and the alpha angle printf("a = %.3lf\nb = %.3lf\nc = %.3lf\nalpha = %.5lf \n\n", a, b, c, alpha); // display the area for different values of h for (double h = 0.0; h < 1.6; h += 0.3) printf("h = %.1lf Area = %.2lf\n", h, Geometry::Area::free_triangle(a, b, c, h, alpha)); return 0; }
| a | first side of the triangle (BC) |
| b | second side of the triangle (AC) |
| c | third side of the triangle (AB) |
| h | the distance between line |
| alpha | the input angle in radians |