I need to calculate the aspect ratio of a triangle. I have the 3 points, and therefore I have the lengths and midpoints. I was attempting to use this tutorial (although its not much of one in my opinion), but it is very vague and doesn't give much information. Could someone elaborate, specifically on the rectangle creation part, or even share a bit of c++ code to solve this problem?
To James's solution:
double s = (a + b + c) / 2.0;
double AR = (a * b * c) / (8.0 * (s - a) * (s - b) * (s - c));
@James:
Cubit reports the following:
Function Name Average Std Dev Minimum Maximum
------------- --------- --------- --------- ---------
Aspect Ratio 1.000e+00 7.371e-04 1.000e+00 1.010e+00
--------------------------------------------------------------
Your formula reports the following:
Function Name Average Minimum Maximum
------------- --------- -------- -------
Aspect Ratio 1.00006 1.000000 1.00972
--------------------------------------------