In[]:=
FeuerbachTheorem::usage="The circumference of the 9 points is tangent internally to the inscribed circumference (Feuerbach point) and externally to the exinscribed circles. References: Wolfram MathWorld: Feuerbach's Theorem; Clark Kimberling's Encyclopedia of Triangle Centers-ETC; Personal.";
In[]:=
FeuerbachTheorem[tri={{x1_,y1_},{x2_,y2_},{x3_,y3_}}]:=​​Module{},DEP=Det[{{x1,y1,1},{x2,y2,1},{x3,y3,1}}];​​P1={x1,y1};P2={x2,y2};P3={x3,y3};​​IfDEP==0,Print[PasteButton["It's not a triangle"]],​​α=TriangleCenter[tri,"NinePointCenter"];​​xn=α[[1]];yn=α[[2]];​​α1=TriangleMeasurement[tri,"NinePointRadius"];​​NinePointCircle=Circle[{xn,yn},α1];​​β=TriangleCenter[tri,"Incenter"];​​xi=β[[1]];yi=β[[2]];​​β1=TriangleMeasurement[tri,"Inradius"];​​Incircle=Circle[{xi,yi},β1];​​γ=TriangleCenter[tri,{"Excenter",{x1,y1}}];​​xe1=γ[[1]];ye1=γ[[2]];​​γ1=TriangleMeasurement[tri,{"Exradius",{x1,y1}}];​​Excircle1=Circle[{xe1,ye1},γ1];​​μ=TriangleCenter[tri,{"Excenter",{x2,y2}}];​​xe2=μ[[1]];ye2=μ[[2]];​​μ1=TriangleMeasurement[tri,{"Exradius",{x2,y2}}];​​Excircle2=Circle[{xe2,ye2},μ1];​​ξ=TriangleCenter[tri,{"Excenter",{x3,y3}}];​​xe3=ξ[[1]];ye3=ξ[[2]];​​ξ1=TriangleMeasurement[tri,{"Exradius",{x3,y3}}];​​Excircle3=Circle[{xe3,ye3},ξ1];​​σ=ResourceFunction["EulerLinePoints"][tri];​​aa=
2
(x3-x2)
+
2
(y3-y2)
;bb=
2
(x3-x1)
+
2
(y3-y1)
;cc1=
2
(x2-x1)
+
2
(y2-y1)
;​​A=ArcCos
2
bb
+
2
cc1
-
2
aa
2bbcc1
;B=ArcCos
2
aa
+
2
cc1
-
2
bb
2aacc1
;C1=ArcCos
2
aa
+
2
bb
-
2
cc1
2aabb
;​​xx=aa(1-Cos[B-C1]);yy=bb(1-Cos[C1-A]);zz=cc1(1-Cos[A-B]);​​
λ
1
=
xx
xx+yy+zz
;
λ
2
=
yy
xx+yy+zz
;
λ
3
=
zz
xx+yy+zz
;​​XF=
λ
1
{x1,y1}+
λ
2
{x2,y2}+
λ
3
{x3,y3};​​xXF=N[Take[XF,{1}].{1}];yXF=N[Take[XF,{2}].{1}];​​PF={xXF,yXF};​​p=Grid[{{FeuerbachPoint},{PF}},FrameAll,ItemSize->15,ItemStyle->15];​​Print[p];​​Print[" "];​​​​Show[{Graphics[{Blue,TriangleConstruct[tri,"Boundary"]}],Graphics[{Blue,PointSize[0.01],Point[P1],Text[Style["
P
1
",14,Bold],P1,{0,-1.2}]}],Graphics[{Blue,PointSize[0.01],Point[P2],Text[Style["
P
2
",14,Bold],P2,{0,-1.2}]}],Graphics[{Blue,PointSize[0.01],Point[P3],Text[Style["
P
3
",14,Bold],P3,{0,-1.2}]}],Graphics[{Red,PointSize[0.015],Point[PF],Text[Style["
P
F
",14,Bold],PF,{0,-1.2}]}],Graphics[{Gray,NinePointCircle}],Graphics[{Purple,Incircle}],Graphics[{Black,Excircle1}],Graphics[{Black,Excircle2}],Graphics[{Black,Excircle3}]},AxesTrue,AxesLabel{x,y},AxesOrigin{0,0},AspectRatioAutomatic,PlotRangeAll,ImageSize700]​​​​
Example 1:
In[]:=
FeuerbachTheorem[tri={{-2,5},{7,12},{9,-4}}]
FeuerbachPoint
{5.78404,8.29995}
Out[]=
Example 2:
In[]:=
FeuerbachTheorem[tri={{0,0},{1,0},{0.3,0.7}}]
FeuerbachPoint
{0.142849,0.329835}
Out[]=
Example 3:
In[]:=
FeuerbachTheorem[tri={{-4,-3},{3,-1},{-3,1}}]
FeuerbachPoint
{-2.98221,-1.94515}