Let $S$ be the set of all points with coordinates $(x,y,z)$, where $x$, $y$, and $z$ are each chosen from the set $\{0,1,2\}$. How many equilateral triangles all have their vertices in $S$?
For this solution, we will just find as many solutions as possible, until it becomes intuitive that there are no more size of triangles left. First, try to make three of its vertices form an equilateral triangle. This we find is possible by taking any vertex, and connecting the three adjacent vertices into a triangle. This triangle will have a side length of $\sqrt{2}$; a quick further examination of this cube will show us that this is the only possible side length (red triangle in diagram). Each of these triangles is determined by one vertex of the cube, so in one cube we have 8 equilateral triangles. We have 8 unit cubes, and then the entire cube (green triangle), giving us 9 cubes and $9 \cdot 8 = 72$ equilateral triangles. [asy] import three; unitsize(1cm); size(200); currentprojection=perspective(1/3,-1,1/2); draw((0,0,0)--(2,0,0)--(2,2,0)--(0,2,0)--cycle); draw((0,0,0)--(0,0,2)); draw((0,2,0)--(0,2,2)); draw((2,2,0)--(2,2,2)); draw((2,0,0)--(2,0,2)); draw((0,0,2)--(2,0,2)--(2,2,2)--(0,2,2)--cycle); draw((2,0,0)--(0,2,0)--(0,0,2)--cycle,green); draw((1,0,0)--(0,1,0)--(0,0,1)--cycle,red); label("$x=2$",(1,0,0),S); label("$z=2$",(2,2,1),E); label("$y=2$",(2,1,0),SE); [/asy] NOTE: Connecting the centers of the faces will actually give an octahedron, not a cube, because it only has $6$ vertices. Now, we look for any additional equilateral triangles. Connecting the midpoints of three non-adjacent, non-parallel edges also gives us more equilateral triangles (blue triangle).  Notice that picking these three edges leaves two vertices alone (labelled A and B), and that picking any two opposite vertices determine two equilateral triangles. Hence there are $\frac{8 \cdot 2}{2} = 8$ of these equilateral triangles, for a total of $\fbox{80}$. [asy] import three; unitsize(1cm); size(200); currentprojection=perspective(1/3,-1,1/2); draw((0,0,0)--(2,0,0)--(2,2,0)--(0,2,0)--cycle); draw((0,0,0)--(0,0,2)); draw((0,2,0)--(0,2,2)); draw((2,2,0)--(2,2,2)); draw((2,0,0)--(2,0,2)); draw((0,0,2)--(2,0,2)--(2,2,2)--(0,2,2)--cycle); draw((1,0,0)--(2,2,1)--(0,1,2)--cycle,blue); label("$x=2$",(1,0,0),S); label("$z=2$",(2,2,1),E); label("$y=2$",(2,1,0),SE); label("$A$",(0,2,0), NW); label("$B$",(2,0,2), NW); [/asy]