In[]:=
MacBeathCircumconic::usage="The MacBeath circumconic is a conical as its name suggests, it passes through the vertices of the triangle. Its center is the symmedian point K. It also passes through the points
X
651
and
X
110
among others. If all the angles are acute it is an ellipse, if there is an obtuse angle it is a hyperbola. References: Wolfram MathWorld: MacBeath Circumconic; ETC; Personal. ";​​​​MacBeathCircumconic[tri={{x1_,y1_},{x2_,y2_},{x3_,y3_}},{X0_,X1_},{Y0_,Y1_}]:=​​Module{},DEP=Det[{{x1,y1,1},{x2,y2,1},{x3,y3,1}}];​​​​IfDEP==0||X0≥X1||Y0≥Y1,Print[PasteButton["Incorrect data or the points do not form a triangle"]],​​ρ=TriangleCenter[tri,"SymmedianPoint"];​​f1=
2
(x2-x1)
+
2
(y2-y1)
2
(x3-x2)
+
2
(y3-y2)
;f2=
2
(x3-x1)
+
2
(y3-y1)
2
(x3-x2)
+
2
(y3-y2)
;f3=1
2
(x3-x1)
+
2
(y3-y1)
2
(x2-x1)
+
2
(y2-y1)
;​​​​xs1=
f1x3+x1
1+f1
;ys1=
f1y3+y1
1+f1
;​​xs2=
f2x2+x1
1+f2
;ys2=
f2y2+y1
1+f2
;​​xs3=
f3x3+x2
1+f3
;ys3=
f3y3+y2
1+f3
;​​solución=Solve[{(xs1-x2)y-(ys1-y2)x-y2(xs1-x2)+x2(ys1-y2)==0,(xs2-x3)y-(ys2-y3)x-y3(xs2-x3)+x3(ys2-y3)==0},{x,y}];​​xK1=x/.solución;xK=xK1.{1};yK1=y/.solución;yK=yK1.{1};​​s=Grid[{{{SymmedianPointMine},{SymmedianPointMathematica}},{{N[xK],N[yK]},{N[ρ[[1]]],N[ρ[[2]]]}}},FrameAll];​​Print[s];​​aa=
2
(x3-x2)
+
2
(y3-y2)
;bb=
2
(x3-x1)
+
2
(y3-y1)
;cc1=
2
(x2-x1)
+
2
(y2-y1)
;​​α=ArcCos
2
bb
+
2
cc1
-
2
aa
2bbcc1
;β=ArcCos
2
aa
+
2
cc1
-
2
bb
2aacc1
;γ=ArcCos
2
aa
+
2
bb
-
2
cc1
2aabb
;​​xx=aaCsc[β-γ];yy=bbCsc[γ-α];zz=cc1Csc[α-β];​​
λ
1
=
xx
xx+yy+zz
;
λ
2
=
yy
xx+yy+zz
;
λ
3
=
zz
xx+yy+zz
;​​X110=
λ
1
{x1,y1}+
λ
2
{x2,y2}+
λ
3
{x3,y3};​​xX110=N[Take[X110,{1}].{1}];yX110=N[Take[X110,{2}].{1}];​​xx1=
Sin[α]
Cos[β]-Cos[γ]
;yy1=
Sin[β]
Cos[γ]-Cos[α]
;zz1=
Sin[γ]
Cos[α]-Cos[β]
;​​
λ
4
=
xx1
xx1+yy1+zz1
;
λ
5
=
yy1
xx1+yy1+zz1
;
λ
6
=
zz1
xx1+yy1+zz1
;​​X651=
λ
4
{x1,y1}+
λ
5
{x2,y2}+
λ
6
{x3,y3};​​xX651=N[Take[X651,{1}].{1}];yX651=N[Take[X651,{2}].{1}];​​p5={{x1,y1},{x2,y2},{x3,y3},{xX110,yX110},{xX651,yX651}};​​ξ=ResourceFunction["FivePointConic"][p5,{x,y}];​​g1=Line[{{x1,y1},{x2,y2},{x3,y3},{x1,y1}}];​​g2=ContourPlotξ==0,{x,X0,X1},{y,Y0,Y1},Epilog
directives
,Point[p5];​​g3=Point[{xX110,yX110}];g4=Point[{xX651,yX651}];g5=Point[{x1,y1}];g6=Point[{x2,y2}];​​g7=Point[{x3,y3}];​​g8=Point[{xK,yK}];​​label[sym_,Point[pos_]]:={PointSize[Scaled[0.0150]],Hue[0.58,1,1],Point[pos],Text[Style[sym,White,FontSizeScaled[0.006]],pos]};​​Print[PasteButton["Information about the MacBeath's Circumconic:"]];Print[" "];​​δ=ResourceFunction["ConicProperties"][ξ==0,{x,y}];​​Print[δ];​​Show[{Graphics[{Brown,g1}],g2,Graphics[{Black,Thick,PointSize[0.01],g5}],Graphics[{Black,Thick,PointSize[0.01],g6}],Graphics[{Black,Thick,PointSize[0.01],g7}],Graphics[{MapThread[label,{{"
X
110
","
X
651
",
K
},{g3,g4,g8}}]}]},AxesTrue,AxesOrigin{0,0},BoxRatiosAutomatic,PlotLabelStyle[Framed["MacBeath's Circumconic"],16,Blue,BackgroundYellow]]​​​​​​
In the command below, type the new coordinates of the points. You can also change the extension to X and Y. Evaluate the notebook.
In[]:=
MacBeathCircumconic[tri={{-6,4},{-4,1},{3,0}},{-20,20},{-20,20}]
{SymmedianPointMine}
{SymmedianPointMathematica}
{-4.05625,1.85625}
{-4.05625,1.85625}
Information about the MacBeath's Circumconic:
TypeHyperbola,Equation-7.49552-0.501494x+1.
2
x
+4.08063y+4.64054xy+3.97106
2
y
0,Foci{{-5.61143,-0.986055},{-2.50107,4.69856}},Vertices{{-4.40022,1.2276},{-3.71228,2.4849}},Eccentricity4.52132,Asymptotes{y-1.72782-0.883591x,y0.700225-0.284998x},Center{-4.05625,1.85625},SemimajorAxisLength0.716595,SemiminorAxisLength3.15971,Directrices{y-0.404087-0.547155x,y-0.347051-0.547155x},AxesOfSymmetry{y9.2696+1.82764x,y-0.363148-0.547155x},SemiLatusRectum13.9323,RotationAngle1.07014,ConjugateHyperbola-7.51083×
20
10
x+1.49769×
21
10
2
x
+6.11151×
21
10
y+6.95008×
21
10
xy+5.94741×
21
10
2
y
-4.97664×
21
10
,BaseConicEquation1.94739
2
x
-0.100162
2
y
1,RotationAngle1.07014,DisplacementFromOrigin{-4.05625,1.85625}
Out[]=