Nearly equilateral triangles
Good values for drawing nearly equilateral triangles on graph paper. Useful for triangular grids, hexagon and rhombus based tesselations.


I often draw hexagons or rhombi on graph paper. Both are based on equilateral triangles, often as part of a triangular grid.

You can not draw an equilateral triangle with integer coordinates only, because this would solve the angle trisection problem. Hence, you have to use approximations. For graphing by hand, only approximations with small integer coordinates are interesting.

My goto approximation for quick sketching of an equilateral triangle has corners $(0,0)$, $(0,2)$ and $(1,2)$. A more decent one is $(0,0)$, $(4,1)$ and $(1,4)$.

Some day I stumbled upon the question I want to graph an equilateral triangle on graph paper. The answers there are interesting, but there were no concrete values given, either.

# Search space

Consider a triangle with corners $A$, $B$ and $C$ in anticlockwise order. Without loss of generality, translation invariance of $\Int^2$ lets us consider only the case of $A=\vec{0}$. Let $\alpha$ be the angle between the line going through $A$ and $B$ and the $x$-axis.

As $\Int^2$ has a rotational symmetry generated by quarter-rotations, one may take the principal representative of $(\alpha\!\!\mod\frac{1}{2}\pi)$ lying in $[0,\frac{1}{2}\pi]$.

If $\alpha\in]\frac{1}{3}\pi,\frac{1}{2}\pi]$, then flip along the $y$-axis. The angle between the $x$-axis and the image of $C$ is then $0\le\pi-\frac{1}{3}\pi-\alpha\le\frac{1}{3}\pi$.

If $\alpha\in]\frac{1}{6}\pi,\frac{1}{3}\pi]$, then translate by $-C$ and rotate anticlockwise by $\frac{1}{2}\pi$. The angle between the image of $\vec{0}$ and the $x$-axis is $0\le\alpha-\frac{1}{6}\pi\le\frac{1}{6}\pi$.

If $\alpha\in]\frac{1}{12}\pi,\frac{1}{6}\pi]$, then flip along the line $x=y$. The angle between the image of $C$ and the $x$-axis is $0\le\frac{1}{2}\pi-\frac{1}{3}\pi-\alpha = \frac{1}{6}\pi - \alpha \le \frac{1}{12}\pi$.

Thus, wlog $\alpha\le\frac{1}{12}\pi$.

# Enumeration

Let $n\in\mathbb{N}$ with $n\ge{}1$. The enumeration of coordinates for $B$ is the set $$B_n := \Set{(x,y)\mid{} 0\in\Set{0,\dotsc,n}, y\in\Set{0,\dotsc,\Floor{x\sin(\frac{1}{12}\pi)}}} \EndDot$$ For each $(x,y)\in{}B_n$, let $\alpha :=\arctan(\frac{y}{x})$ and $c:=\sqrt{x^2 + y^2}$. Let $\beta:=\frac{1}{3}\pi-\alpha$. Let $$C(x):= x - \cos(\beta) c \qquad \text{and} \qquad C(y):= y + \sin(\beta) c \EndDot$$ Let $$C(x,y):=\Set{\Floor{C(x)},\Ceil{C(x)}}\times\Set{\Floor{C(y)},\Ceil{C(y)}} \EndDot$$ Hence, the full enumeration is $$E_n := \Set{ (B,C)\mid{} B\in{}B_n, C\in{}C(B) } \EndDot$$

# Approximation error

Let $(B,C)\in{}E_n$. Let $a:=\TwoNorm{B-C}$, $b:=\TwoNorm{C}$ and $c:=\TwoNorm{B}$ be the side-lengths of the triangle with corners $\vec{0}$, $B$ and $C$. Let $$m := \min\Set{a,b,c} \qquad \text{and} \qquad M := \max\Set{a,b,c} \EndDot$$ The relative sidelength error is $R_S(B,C):=\Modulus{\frac{M}{m}-1}$ and the absolute sidelength error ist $A_S(B,C):=M-m$.

Let $\alpha$, $\beta$ and $\gamma$ be the angles opposite of $A$, $B$ and $C$, respectively. Let $$\delta := \min\Set{\alpha,\beta,\gamma} \qquad \text{and} \qquad \Delta := \max\Set{\alpha,\beta,\gamma} \EndDot$$ The relative angle error is $R_W(B,C):=\Modulus{\frac{\Delta}{\delta}-1}$ and the absolute angle error ist $A_W(B,C):=\Delta-\delta$. Here $W$ stands for “Winkel”.

Let $I$ and $i$ be the radii of the circumscribed and inscribed circles respectively. Then the relative radii error is $R_C(B,C):=\Modulus{\frac{I}{i}-1}$ and the absolute radii error is $A_C(B,C):=I-i$.

With $s:=\frac{a+b+c}{2}$ and $$A := \sqrt{s(s-a)(s-b)(s-c)}$$ the area of the triangle by Heron’s formula, the radius of the inscribed circle is wikipedia $$r = \frac{A}{s}$$ and the radius of the circumscribed circle is diameter formula $$R = \frac{abc}{4A} ,.$$

# Best solutions for small n

See the F# script.

## Usual candidates

$B$$C$$L(B,C)$$W(B,C) (0,2)$$(1,2)$$0.105572809$$0.1624474625$
$(4,1)$$(1,4)$$0.028174684$$0.0466879655 ## Ordered by angles quality The best solutions for n\le 10. B$$C$$L(B,C)$$W(B,C)$
$(8, 0)$$(4, 7)$$0.00772212328$$0.01270192683 (10, 1)$$(4, 9)$$0.02000202061$$0.03274063767$
$(10, 0)$$(5, 9)$$0.02871413764$$0.04653653752 (4, 1)$$(1, 4)$$0.02817468419$$0.04668796554$
$(6, 0)$$(3, 5)$$0.02817468419$$0.04668796554 (8, 2)$$(2, 8)$$0.02817468419$$0.04668796554$
$(9, 2)$$(3, 9)$$0.02817468419$$0.04668796554 ## Ordered by sidelength quality The best solutions for n\le 10. B$$C$$L(B,C)$$W(B,C)$
$(8, 0)$$(4, 7)$$0.00772212328$$0.01270192683 (10, 1)$$(4, 9)$$0.02000202061$$0.03274063767$
$(4, 1)$$(1, 4)$$0.02817468419$$0.04668796554 (6, 0)$$(3, 5)$$0.02817468419$$0.04668796554$
$(8, 2)$$(2, 8)$$0.02817468419$$0.04668796554 (9, 2)$$(3, 9)$$0.02817468419$$0.04668796554$
$(10, 0)$$(5, 9)$$0.02871413764$$0.04653653752 ## Larger solutions B$$C$$L(B,C)$$W(B,C)$
$(30, 0)$$(15, 26)$$0.0005550930208$$0.0009177507162 (45, 4)$$(19, 41)$$0.0009784738155$$0.001618174436$
$(49, 11)$$(15, 48)$$0.001384905205$$0.002289754747$

# Summary

So $((4,1),(1,4))$ is a nice symmetric (along $x=y$) solution usable fast sketching. The large solutions $((45, 4),(19, 41))$ and $((49, 11),(15, 48))$ are interesting because they are not symmetric along $x=y$.