A triangle given by their vertices p_1,p_2,p_3p1,p2,p3 has area given by
A=1/2abs((y_2+y_1)(x_2-x_1)+(y_3+y_2)(x_3-x_2)+(y_1+y_3)(x_1-x_3))A=12|(y2+y1)(x2−x1)+(y3+y2)(x3−x2)+(y1+y3)(x1−x3)|
or by the famous Heron's formula (circa 60 AD). Given their sides lenght
a = norm(p_2-p_1)a=∥p2−p1∥
b = norm(p_3-p_2)b=∥p3−p2∥
c = norm(p_1-p_3)c=∥p1−p3∥
and calling s = (a+b+c)/2s=a+b+c2 semiperimeter,
then
A = sqrt(s(s-a)(s-b)(s-c))A=√s(s−a)(s−b)(s−c)
Calling now oo the triangle's orthocenter, which is the intersection of bissectrices from each vertice's angle, the distance from oo to each side is given by rr which is the internal circle radius. So we can state.
1/2(a xx r + b xx r +c xx r) = r(a+b+c)/2 = r xx s = A12(a×r+b×r+c×r)=ra+b+c2=r×s=A
solving for rr
r = A/s= sqrt(s(s-a)(s-b)(s-c))/s=sqrt(((s-a)(s-b)(s-c))/s)r=As=√s(s−a)(s−b)(s−c)s=√(s−a)(s−b)(s−c)s
Taking a = 5.38516,b=4.47214,c=6.7082a=5.38516,b=4.47214,c=6.7082
we obtain r = 1.44879r=1.44879