EquilateralTriangle
EquilateralTriangle
Represents an equilateral triangle
Definition
Definition
In[6]:=
ClearAll[EquilateralTriangle]EquilateralTriangle::usage="EquilateralTriangle[] represents an equilateral triangle with sides of length 1. EquilateralTriangle[s] represents an equilateral triangle with sides of length s.";SetAttributes[EquilateralTriangle,{Listable}]Which[TrueQ[$VersionNumber≥13.3],EquilateralTriangle[Optional[s:(_?(MatchQ[#,x_?RealValuedNumericQ/;x>0]&)|_?(MatchQ[#,x_Symbol/;ValueQ[x]===False]&)),1]]:=SSSTriangle[s,s,s],TrueQ[$VersionNumber<13.3],EquilateralTriangle[Optional[s:(_?(MatchQ[#,x_Real/;x>0]&)|_?(MatchQ[#,x_Symbol/;ValueQ[x]===False]&)),1]]:=SSSTriangle[s,s,s]](*EquilateralTriangle[Optional[s:(_?(MatchQ[#,x_?RealValuedNumericQ/;x>0]&)|_?(MatchQ[#,x_Symbol/;ValueQ[x]===False]&)),1]]:=SSSTriangle[s,s,s]*)EquilateralTriangle[args___]:=Null/;CheckArguments[EquilateralTriangle[args],{1,1}]
Documentation
Documentation
Usage
Usage
EquilateralTriangle[]
represents an equilateral triangle with sides of length 1.
EquilateralTriangle[s]
represents an equilateral triangle with sides of length .
s
Details & Options
Details & Options
▪
An equilateral triangle means an equal side triangle. An equilateral triangle is an equiangular triangle, where all angles are the same, 60° or π/3 radians.
▪
In an equilateral triangle, many triangle centers coincide in the center.
Examples
Examples
Basic Examples
Basic Examples
A triangle in which all sides are equal is an equilateral triangle:
In[499]:=
t=EquilateralTriangle[]
Out[499]=
Triangle{0,0},{1,0},,
1
2
3
2
Visualize it:
In[430]:=
Region[t]
Out[430]=
Find its area:
In[451]:=
Area[EquilateralTriangle[s]]
Out[451]=
1
4
3
2
Abs[s]
Use to simplify [s] to just s by assuming the side length is an element of the PositiveReals, written :
>0
In[452]:=
Refine,{s∈PositiveReals}
1
4
3
2
Abs[s]
Out[452]=
3
2
s
4
The circumcircle of an can be found using :
In[455]:=
tri=EquilateralTriangle[]
Out[455]=
Triangle{0,0},{1,0},,
1
2
3
2
The circumcircle passes through the three corner points:
In[456]:=
circ=Circumsphere[First@tri]
Out[456]=
Sphere,,-+
1
2
1
2
3
1
2
3
3
2
In[458]:=
Graphics[{Style[circ,Directive[LightGray]],Style[tri,Directive[LightBlue]],Style[Point[First@tri],Directive[Black]]}]
Out[458]=
Find the midpoints for each edge of the triangle:
In[459]:=
midpts=RegionCentroid[Line[#]]&/@Subsets[First@tri,{2}]
Out[459]=
,0,,,,
1
2
1
4
3
4
3
4
3
4
In[460]:=
Graphics[{Style[tri,Directive[LightBlue]],Point[midpts]}]
Out[460]=
The perpendicular bisectors are lines from the circumcenter to the midpoints:
In[462]:=
center=First[circ];bisectors=Line[{center,#}]&/@midpts;
In[466]:=
Graphics[{Style[tri,Directive[LightBlue]],Point[center],Point[midpts],Style[bisectors,Directive[Red,Dashed]]}]
Out[466]=
Scope
Scope
Text about additional examples expanding scope (and see other sections for options, applications, etc):
Options
Options
Applications
Applications
As expected, the result is an equilateral triangle:
The Euler line passes through the centroid, circumcenter, orthocenter and nine-point center:
The centroid, the circumcenter, the orthocenter and the nine-point center are all the same in any equilateral triangle:
Make a dataset of equilateral triangles of different sizes:
Make an equilateral triangle with a side length of the golden ratio:
Make a region:
Make a graphic:
Find the centroid exactly and numerically:
Find the moment of inertia exactly and numerically:
Find the region moment:
Find the perimeter:
Properties and Relations
Properties and Relations
Possible Issues
Possible Issues
Neat Examples
Neat Examples
Random equilateral triangles with 0.5 opacity to allow seeing triangles in the background:
Source & Additional Information
Source & Additional Information
Peter Cullen Burbery
◼
Triangles
◼
Geometry
◼
Planar geometry
◼
Polygons
Categories
Categories
◼
SSSTriangle
◼
Triangle
◼
Polygon
◼
TriangularGridGraph
The documentation for SSSTriangle, StadiumShape, and TriangleCenter. I also got help from ChatGPT.
◼
Link to other related material
13.3+
Additional information about limitations, issues, etc.
Additional information for the reviewer.