In[]:=
LineGergonneIncenterX20::usage="The straight line passes through the point of Gergonne, the incenter and the point (it is the point of Longchamps), and is the reflection of the circumcenter through the orthocenter. References: Wolfram MathWorld, Gergonne point notebook. ";LineGergonneIncenterX20[tri={{x1_,y1_},{x2_,y2_},{x3_,y3_}}]:=Module[{},DEP=Det[{{x1,y1,1},{x2,y2,1},{x3,y3,1}}];If[DEP==0,Print[PasteButton["The points do not form a triangle"]],μ=TriangleCenter[tri,"Incenter"];cx=μ[[1]];cy=μ[[2]];μ1=TriangleMeasurement[tri,"Inradius"];ri=μ1;s1=Solve[{(y1-y2)x+(x2-x1)y+(x1y2-y1x2)==0,+==},{x,y}];xt11=x/.Take[s1,{1}];xt1=xt11.{1};yt11=y/.Take[s1,{1}];yt1=yt11.{1};s2=Solve[{(y2-y3)x+(x3-x2)y+(x2y3-y2x3)==0,+==},{x,y}];xt22=x/.Take[s2,{1}];xt2=xt22.{1};yt22=y/.Take[s2,{1}];yt2=yt22.{1};s3=Solve[{(y1-y3)x+(x3-x1)y+(x1y3-y1x3)==0,+==},{x,y}];xt33=x/.Take[s3,{1}];xt3=xt33.{1};yt33=y/.Take[s3,{1}];yt3=yt33.{1};s4=Solve[{(x1-xt2)y-(y1-yt2)x-y1(x1-xt2)+x1(y1-yt2)==0,(x2-xt3)y-(y2-yt3)x-y2(x2-xt3)+x2(y2-yt3)==0},{x,y}];xg1=x/.s4;xg=xg1.{1};yg1=y/.s4;yg=yg1.{1};circumcenter=TriangleConstruct[tri,"Circumcenter"];orthocenter=TriangleConstruct[tri,"Orthocenter"];x20=Point[ReflectionTransform[orthocenter〚1〛-circumcenter〚1〛,circumcenter〚1〛][orthocenter〚1〛]];xX20=x20[[1,1]];yX20=x20[[1,2]];g1=Line[{{x1,y1},{x2,y2},{x3,y3},{x1,y1}}];g2=Point[{xg,yg}];g3=Point[{xt1,yt1}];g4=Point[{xt2,yt2}];g5=Point[{xt3,yt3}];g6=Line[{{x1,y1},{xg,yg},{xt2,yt2}}];g7=Line[{{x2,y2},{xg,yg},{xt3,yt3}}];g8=Line[{{x3,y3},{xg,yg},{xt1,yt1}}];g9=Circle[{cx,cy},ri];g10=Point[{cx,cy}];g11=Point[{xX20,yX20}];g12=InfiniteLine[{{xg,yg},{cx,cy}}];g13=Point[{x1,y1}];g14=Point[{x2,y2}];g15=Point[{x3,y3}];label[sym_,Point[pos_]]:={PointSize[Scaled[0.023]],Hue[0.58,1,1],Point[pos],Text[Style[sym,White,FontSizeScaled[0.012]],pos]};Print[" "];w=Grid[{{GergonnePoint,Incenter,},{{N[xg],N[yg]},{N[cx],N[cy]},{N[xX20],N[yX20]}}},FrameAll,ItemSize->10,ItemStyle->12];Print[w];A=cy-yg;B=xg-cx;CC=cxyg-cyxg;Print[" "];Print[PasteButton["The equation of the line that contains the points of Gergonne, incenter and is: "],{A,B,CC}.{x,y,1}==0];Print[" "];SwatchLegend[{Red,Green,Purple,Brown},{"The line that contains the points of Gergonne, incenter and ","Inscribed circumference","Straight lines that go from the tangent point to the opposite vertex","Tangent points"}]Show[{Graphics[{Blue,g1}],Graphics[{Brown,PointSize[0.01],g3}],Graphics[{Brown,PointSize[0.01],g4}],Graphics[{Brown,PointSize[0.01],g5}],Graphics[{Black,PointSize[0.01],g13}],Graphics[{Black,PointSize[0.01],g14}],Graphics[{Black,PointSize[0.01],g15}],Graphics[{Purple,g6}],Graphics[{Purple,g7}],Graphics[{Purple,g8}],Graphics[{Green,g9}],Graphics[{Red,g12}],Graphics[{MapThread[label,{{"Ge","I",},{g2,g10,g11}}]}]},AxesTrue,AxesOrigin{0,0},AspectRatioAutomatic,ImageSize900,PlotLabelStyle[Framed["The line that contains the points of Gergonne, incenter and "],16,Blue,BackgroundYellow]]]]
X
20
2
(x-cx)
2
(y-cy)
2
ri
2
(x-cx)
2
(y-cy)
2
ri
2
(x-cx)
2
(y-cy)
2
ri
X
20
X
20
X
20
X
20
X
20
In the command below, type the new coordinates of the points. Evaluate the notebook.
In[]:=
LineGergonneIncenterX20[tri={{-2,5},{7,12},{9,-4}}]
GergonnePoint | Incenter | X 20 |
{3.38764,5.21637} | {4.06947,4.92508} | {10.7089,2.08861} |
130(10
65
-4130
+12202
)(-909+1012
-76565
+813130
)(2
65
+130
+202
)(-13130-65652
-1306565
+14813130
)130(-4
65
+9130
+7202
)(459853-2232102
-147736565
+203613130
)(2
65
+130
+202
)(-1300-652
+13130
)(-13130-65652
-1306565
+14813130
)10
65
-4130
+12202
2
65
+130
+202
130(459853-223210
2
-147736565
+203613130
)(-1300-65
2
+13130
)(-13130-65652
-1306565
+14813130
)-4
65
+9130
+7202
2
65
+130
+202
130(-909+101
2
-76565
+813130
)-13130-6565
2
-1306565
+14813130
Out[]=