Function Repository Resource:

SteinerCircumellipse

Source Notebook

Generate the Steiner circumellipse of a 2D triangle

Contributed by: Jan Mangaldan

ResourceFunction["SteinerCircumellipse"][{p1,p2,p3}]

returns an Ellipsoid representing the Steiner circumellipse of the triangle defined by vertices p1,p2 and p3.

ResourceFunction["SteinerCircumellipse"][{p1,p2,p3},property]

gives the value of the specified property.

Details

The Steiner circumellipse of a triangle is the unique ellipse centered at the triangle's centroid that passes through all the triangle's vertices.
The following properties are supported:
"Ellipsoid"Ellipsoid representing the circumellipse
"Parametric"parametric equation for the circumellipse as a pure function
"Implicit"implicit Cartesian equation for the circumellipse as a pure function
ResourceFunction["SteinerCircumellipse"][poly] where poly is a Triangle or Polygon is equivalent to ResourceFunction["SteinerCircumellipse"][PolygonCoordinates[poly]].

Examples

Basic Examples (1) 

Show a triangle together with its Steiner circumellipse:

In[1]:=
tri = {{0, 0}, {1.2, 4}, {5, 0}};
Graphics[{FaceForm[], {EdgeForm[Red], Triangle[tri]}, {EdgeForm[Blue],
    ResourceFunction["SteinerCircumellipse"][tri]}}]
Out[1]=

Scope (5) 

A triangle:

In[2]:=
Graphics[tri = Triangle[{{0, 0}, {0.4, 3.1}, {5, 0}}]]
Out[2]=

Generate the parametric equation of the triangle's Steiner circumellipse:

In[3]:=
ell1[t_] = ResourceFunction["SteinerCircumellipse"][tri, "Parametric"][t]
Out[3]=

Plot the parametric equation along with the triangle:

In[4]:=
ParametricPlot[ell1[t], {t, 0, 2 \[Pi]}, Epilog -> {ColorData[97, 4], tri}]
Out[4]=

Generate the implicit equation of the triangle's Steiner circumellipse:

In[5]:=
ell2[x_, y_] = ResourceFunction["SteinerCircumellipse"][tri, "Implicit"][x, y]
Out[5]=

Plot the implicit equation along with the triangle:

In[6]:=
ContourPlot[ell2[x, y] == 0, {x, -2, 6}, {y, -2, 4}, AspectRatio -> Automatic, Epilog -> {ColorData[97, 4], tri}]
Out[6]=

Properties and Relations (3) 

Use the resource function EllipseProperties to generate properties of the circumellipse:

In[7]:=
ResourceFunction["EllipseProperties"][
 ResourceFunction["SteinerCircumellipse"][{{0, 0}, {1.1, 4}, {5, 0}}, "Implicit"][x, y] == 0, {x, y}]
Out[7]=

The area of the Steiner circumellipse is a constant multiple of the area of the original triangle:

In[8]:=
tri = Triangle[{{0, 0}, {1.5, 4}, {5, 0}}];
Area[ResourceFunction["SteinerCircumellipse"][tri]] - (4 \[Pi])/(
   3 Sqrt[3]) Area[tri] // Chop
Out[8]=

The Steiner inellipse is the Steiner circumellipse scaled by a factor of 1/2. It passes through the midpoints of the triangle's sides:

In[9]:=
tri = Triangle[{{0, 0}, {1.5, 4}, {5, 0}}];
inell = TransformedRegion[
   ResourceFunction["SteinerCircumellipse"][tri], ScalingTransform[{1/2, 1/2}, Mean @@ tri]];
Graphics[{FaceForm[], {EdgeForm[Blue], tri}, {EdgeForm[Red], inell}, {Brown, AbsolutePointSize[5], Point[Mean /@ Partition[First[tri], 2, 1, 1]]}}]
Out[9]=

Neat Examples (1) 

Visualize Marden's theorem for a cubic polynomial:

In[10]:=
p[z_] := (24 + 7 I) - 25 z - 7 I z^2 + z^3;
rts = z /. Solve[p[z] == 0, z]; Graphics[{FaceForm[], {EdgeForm[ColorData[97, 4]], Triangle[ReIm[rts]]}, {AbsolutePointSize[5], ColorData[97, 4], Point[ReIm[rts]]}, {EdgeForm[ColorData[97, 3]], TransformedRegion[
    ResourceFunction["SteinerCircumellipse"][ReIm[rts]], ScalingTransform[{1/2, 1/2}, ReIm[Mean[rts]]]]}, {AbsolutePointSize[4], ColorData[97, 3], Point[ReIm[z /. Solve[p'[z] == 0, z]]]}}]
Out[10]=

Version History

  • 1.0.0 – 23 August 2021

Related Resources

License Information