Out[]=
Geometria2D`Conicas`
In[]:=
SteinerInellipse::usage="This notebook obtains the tangent points with the triangle (midpoints) andthe center (barycenter) of Steiner's inellipse. References: Wolfram Math World: Steiner Circumellipse. ";SteinerInellipse[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 points do not form a triangle"]],bax=;bay=;m1x=;m1y=;m2x=;m2y=;m3x=;m3y=;Print[""];xp1=2bax-m1x;yp1=2bay-m1y;xp2=2bax-m2x;yp2=2bay-m2y;xp3=2bax-m3x;yp3=2bay-m3y;s6=NSolve[a11m1x^2+m1xm1y+c11m1y^2+d11m1x+e11m1y+f11==0, a11m2x^2+m2xm2y+c11m2y^2+d11m2x+e11m2y+f11==0, a11m3x^2+m3xm3y+c11m3y^2+d11m3x+e11m3y+f11==0, a11xp1^2+xp1yp1+c11yp1^2+d11xp1+e11yp1+f11==0, a11xp2^2+xp2yp2+c11yp2^2+d11xp2+e11yp2+f11==0,{a11,c11,d11,e11,f11}]; a22=a11/.s6;c22=c11/.s6;d22=d11/.s6;e22=e11/.s6;f22=f11/.s6; at1=a22.{1}; bt1=1; ct1=c22.{1}; dt1=d22.{1}; et1=e22.{1}; ft22=f22.{1};Print[PasteButton["The equation of Steiner's inellipse is:"]];Print[" "];Print[{at1,bt1,ct1,dt1,et1,ft22}.{,xy,,x,y,1}==0];Print[""];g1=Line[{{x1,y1},{x2,y2},{x3,y3},{x1,y1}}];g2=Point[{bax,bay}];g3=Point[{m1x,m1y}];g4=Point[{m2x,m2y}];g5=Point[{m3x,m3y}];g6=Line[{{m1x,m1y},{bax,bay},{x3,y3}}];g7=Line[{{m2x,m2y},{bax,bay},{x1,y1}}];g8=Line[{{m3x,m3y},{bax,bay},{x2,y2}}];g9=Point[{xp1,yp1}];g10=Point[{xp2,yp2}];g11=Point[{xp3,yp3}];g12=ContourPlot[at1x^2+bt1xy+ct1y^2+dt1x+et1y+ft22==0,{x,X0,X1},{y,Y0,Y1}];g13=Point[{x1,y1}];g14=Point[{x2,y2}];g15=Point[{x3,y3}];Conicas[at1,bt1,ct1,dt1,et1,ft22,{X0,X1},{Y0,Y1}];SwatchLegend[{Blue,Purple,Gray,Red,Green},{"Steiner inellipse","Medium lines","Barycenter","Midpoints","Points obtained with the barycenter and each midpoint and the property of the diameter"}]Show[{g12,Graphics[{Gray,PointSize[0.015],g2}],Graphics[{Blue,g1}],Graphics[{Red,PointSize[0.015],g3}],Graphics[{Red,PointSize[0.015],g4}],Graphics[{Red,PointSize[0.015],g5}],Graphics[{Purple,g6}],Graphics[{Purple,g7}],Graphics[{Purple,g8}],Graphics[{Green,PointSize[0.015],g9}],Graphics[{Green,PointSize[0.015],g10}],Graphics[{Green,PointSize[0.015],g11}],Graphics[{Black,PointSize[0.015],g13}],Graphics[{Black,PointSize[0.015],g14}],Graphics[{Black,PointSize[0.015],g15}]},AxesTrue,AxesOrigin{0,0},AspectRatioAutomatic,ImageSize900,PlotLabelStyle[Framed["Steiner inellipse and triangle detail"],16,Blue,BackgroundYellow]]
x1+x2+x3
3
y1+y2+y3
3
x1+x2
2
y1+y2
2
x3+x2
2
y3+y2
2
x1+x3
2
y1+y3
2
2
x
2
y
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[]:=
SteinerInellipse[tri={{-2,5},{7,12},{9,-4}},{-15,15},{-15,15}]
79.8824-30.8235x+2.83824-17.7941y+xy+1.514710
2
x
2
y
The values of a, b, c, and e are:
LL´
4.76562 | 3.19026 | 3.54026 | 4.27132 | 0.742874 |
Major axis in y''
After the rotation the equation is:
79.8824-34.8814+3.00589-7.07189+1.34705= 0
´
x
´2
x
´
y
´2
y
The rotation angle is:
θ = 18.5365°
After the translation the equation is:
-30.5931+3.00589+1.34705= 0
´´2
x
´´2
y
The coordinates of the new origin are:
´´
O
Out[]=