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 and 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}}];IfDEP==0||X0≥X1||Y0≥Y1,Print[PasteButton["Incorrect data or the points do not form a triangle"]],ρ=TriangleCenter[tri,"SymmedianPoint"];f1=++;f2=++;f3=1++;xs1=;ys1=;xs2=;ys2=;xs3=;ys3=;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]]]}}},FrameAll];Print[s];aa=+;bb=+;cc1=+;α=ArcCos+-;β=ArcCos+-;γ=ArcCos+-;xx=aaCsc[β-γ];yy=bbCsc[γ-α];zz=cc1Csc[α-β];=;=;=;X110={x1,y1}+{x2,y2}+{x3,y3};xX110=N[Take[X110,{1}].{1}];yX110=N[Take[X110,{2}].{1}];xx1=;yy1=;zz1=;=;=;=;X651={x1,y1}+{x2,y2}+{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,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,FontSizeScaled[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,{{"","",},{g3,g4,g8}}]}]},AxesTrue,AxesOrigin{0,0},BoxRatiosAutomatic,PlotLabelStyle[Framed["MacBeath's Circumconic"],16,Blue,BackgroundYellow]]
X
651
X
110
2
(x2-x1)
2
(y2-y1)
2
(x3-x2)
2
(y3-y2)
2
(x3-x1)
2
(y3-y1)
2
(x3-x2)
2
(y3-y2)
2
(x3-x1)
2
(y3-y1)
2
(x2-x1)
2
(y2-y1)
f1x3+x1
1+f1
f1y3+y1
1+f1
f2x2+x1
1+f2
f2y2+y1
1+f2
f3x3+x2
1+f3
f3y3+y2
1+f3
2
(x3-x2)
2
(y3-y2)
2
(x3-x1)
2
(y3-y1)
2
(x2-x1)
2
(y2-y1)
2
bb
2
cc1
2
aa
2bbcc1
2
aa
2
cc1
2
bb
2aacc1
2
aa
2
bb
2
cc1
2aabb
λ
1
xx
xx+yy+zz
λ
2
yy
xx+yy+zz
λ
3
zz
xx+yy+zz
λ
1
λ
2
λ
3
Sin[α]
Cos[β]-Cos[γ]
Sin[β]
Cos[γ]-Cos[α]
Sin[γ]
Cos[α]-Cos[β]
λ
4
xx1
xx1+yy1+zz1
λ
5
yy1
xx1+yy1+zz1
λ
6
zz1
xx1+yy1+zz1
λ
4
λ
5
λ
6
X
110
X
651
K
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} |
TypeHyperbola,Equation-7.49552-0.501494x+1.+4.08063y+4.64054xy+3.971060,Foci{{-5.61143,-0.986055},{-2.50107,4.69856}},Vertices{{-4.40022,1.2276},{-3.71228,2.4849}},Eccentricity4.52132,Asymptotes{y-1.72782-0.883591x,y0.700225-0.284998x},Center{-4.05625,1.85625},SemimajorAxisLength0.716595,SemiminorAxisLength3.15971,Directrices{y-0.404087-0.547155x,y-0.347051-0.547155x},AxesOfSymmetry{y9.2696+1.82764x,y-0.363148-0.547155x},SemiLatusRectum13.9323,RotationAngle1.07014,ConjugateHyperbola-7.51083×x+1.49769×+6.11151×y+6.95008×xy+5.94741×-4.97664×,BaseConicEquation1.94739-0.1001621,RotationAngle1.07014,DisplacementFromOrigin{-4.05625,1.85625}
2
x
2
y
20
10
21
10
2
x
21
10
21
10
21
10
2
y
21
10
2
x
2
y
Out[]=