Function Resource
DEFINITION NOTEBOOK
Function Repository »
Open Sample
Style Guidelines
Tools
Check
Preview
Deploy
▼
Submit to Repository
Template Input
Literal Input
Insert Delimiter
Subscripted Variable
Tables▼
Cells▼
June 19, 2023
1:06 pm
June 19, 2023 1:06 pm
Found 1 suggestion
​
June 19, 2023
1:06 pm
June 19, 2023 1:06 pm
✓
No issues found
June 19, 2023 1:06 pm
✓
Your resource has been submitted for review.
Submission ID:
1538
June 19, 2023
2:20 pm
June 19, 2023 2:20 pm
$Aborted
June 19, 2023 2:22 pm
Published to the cloud
View »
[◼]
EquilateralTriangle

EquilateralTriangle

Represents an equilateral triangle

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

Usage

EquilateralTriangle[]
represents an equilateral triangle with sides of length 1.
EquilateralTriangle[s]
represents an equilateral triangle with sides of length
s
.

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

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
Refine
to simplify
Abs
[s]
to just s by assuming the side length is an element of the PositiveReals, written

>0
:
In[452]:=
Refine
1
4
3
2
Abs[s]
,{s∈PositiveReals}
Out[452]=
3
2
s
4
The circumcircle of an
SSSTriangle
can be found using
Circumsphere
:
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]=

1
2
,0,
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

Text about additional examples expanding scope (and see other sections for options, applications, etc):

Options

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

Possible Issues

Neat Examples

Random equilateral triangles with 0.5 opacity to allow seeing triangles in the background:

Source & Additional Information

Peter Cullen Burbery
◼
  • Triangles
  • ◼
  • Geometry
  • ◼
  • Planar geometry
  • ◼
  • Polygons
  • 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.