# How might I typeset the Fano plane in LaTeX?

I'm sorry if this is a duplicate in any way or is otherwise a lousy question.

How might I typeset the Fano plane in LaTeX?

In particular, I need a vector graphic of it and I would prefer to use the tikz package. I don't want to copy & paste someone's answer either: I'd like to be able to customise it.

Here's a picture of the Fano plane for convenience:

I'm afraid I haven't got a clue. I can use tikz-cd for the average commutative diagram but that's about it.

• Drawing a circle: \draw (0,0) circle (1cm);. Drawing a circle and filling it: \fill (2,2) circle (.15cm);. Drawing a straight line \draw (0,0) -- (2,2); I think that would do it. The (x,y) are coordinates, and you can also use (θ:1cm) for polar coordinates (e.g., (30:2cm), where 30 is the angle). By the way, just reading the first pages of the pgfmanual.pdf would clear most of it. – Manuel Oct 24 '14 at 21:16
• If you don't want to copy an answer, search in the manual for regular polygon and look at the first example. – percusse Oct 24 '14 at 21:19
• Thank you. I knew I was over-thinking it. (It might not look like it but I am trying.) – Shaun Oct 24 '14 at 21:24

Using some basic geometry and the calc library, you can leave all the calculations to TikZ:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand\FanoPlane[1][1cm]{%
\begin{tikzpicture}[
mydot/.style={
draw,
circle,
fill=black,
inner sep=1.5pt}
]
\draw
(0,0) coordinate (A) --
(#1,0) coordinate (B) --
($(A)!.5!(B) ! {sin(60)*2} ! 90:(B)$) coordinate (C) -- cycle;
\coordinate (O) at
(barycentric cs:A=1,B=1,C=1);
\draw (C) -- ($(A)!.5!(B)$) coordinate (LC);
\draw (A) -- ($(B)!.5!(C)$) coordinate (LA);
\draw (B) -- ($(C)!.5!(A)$) coordinate (LB);
\foreach \Nodo in {A,B,C,O,LC,LA,LB}
\node[mydot] at (\Nodo) {};
\end{tikzpicture}%
}

\begin{document}

\end{document}

• Lovely answer, but is there a reason why the 1.717 (in radius=#1*1.717/6) was pre-calculated, rather than delegated to calc like everything else? – Peter LeFanu Lumsdaine Oct 25 '14 at 11:09
• 2 in sin(60)*2 was precalculated, also. ;-) – JPi Apr 20 '17 at 19:52

Here are two short solutions:

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (30:1)  -- (210:2)
(150:1) -- (330:2)
(270:1) -- (90:2)
(90:2)  -- (210:2) -- (330:2) -- cycle
(0:0)   circle (1);
\fill (0:0)   circle(3pt)
(30:1)  circle(3pt)
(90:2)  circle(3pt)
(150:1) circle(3pt)
(210:2) circle(3pt)
(270:1) circle(3pt)
(330:2) circle(3pt);
\end{tikzpicture}
\end{document}

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\draw \foreach \a in {30,150,270}{(\a:1)  -- (180+\a:2)}
(90:2)  -- (210:2) -- (330:2) -- cycle
(0:0) circle (1);
\fill \foreach \p in {(0:0),(30:1),(90:2),(150:1),(210:2),(270:1),(330:2)}
{\p circle(3pt)};
\end{tikzpicture}
\end{document}


I read this answer on the site and tried to draw what you are questioning.

%pdflatex
\documentclass[margin=0.5mm]{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}

\draw (0,0) circle (0.5);
\draw (90:1) -- (-30:1)--(210:1)--cycle;

\draw (90:1)--(0,0);
\draw (210:1)--(0,0);
\draw (-30:1)--(0,0);

\draw (30:0.5)--(0,0);
\draw (150:0.5)--(0,0);
\draw (270:0.5)--(0,0);

\fill (-0.866,-0.5) circle (1.5pt);
\fill (0.866,-0.5) circle (1.5pt);
\fill (0,-0.5) circle (1.5pt);
\fill (0,1) circle (1.5pt);
\fill (0,0) circle (1.5pt);
\fill (0.433,0.25) circle (1.5pt);
\fill (-0.433,0.25) circle (1.5pt);

\end{tikzpicture}
\end{document}


Another solution based on pstricks, with a short code thands to the pst-poly package. The pdf option allows for pdfLaTeX compilation, provided you set the --shell-escape switch for TeX Live or MacTeX, --enable-write18 for MiKTeX:

\documentclass[12pt, pdf, x11names]{standalone}

\usepackage{pst-poly}

\begin{document}
\psset{unit = 2cm,dimen = m}
\begin{pspicture*}(-1.25,-1)(1.25,1.1)
\providecommand{\PstPolygonNode}{%
\psdots[dotstyle = o, dotsize=4pt,fillstyle = solid, fillcolor=cyan](1;\INode)}
\psset{ linewidth = 0.6pt}
\rput{-30}(0,0){\PstTriangle[PolyName =A]}
\pscircle(A0){0.5}
\rput{150}(0,0){\PstTriangle[unit=0.5, PolyOffset=2,PolyName=I, linestyle=none]}
\multido{\i = 1 + 1}{3}{\ncline[nodesep = 2pt]{A\i}{I\i}}
\psdot[dotstyle = o, dotsize=4pt,fillstyle = solid, fillcolor=cyan](A0)
\end{pspicture*}

\end{document}


• To get a perfect overlapping of the curves, envoke dimen = m. – Svend Tveskæg Oct 25 '14 at 9:45
• @Svend Tveskæg: Thanks a lot, I've updated my answer. I didn't know about this parameter, and it puzzled me in your solution. Where is it documented? – Bernard Oct 25 '14 at 10:11
• See page 26 of the PSTricks user guide. Also, it is enough to use i, m, or o instead of inner, middle, or outer. – Svend Tveskæg Oct 25 '14 at 10:19

Not that much different from the others really...

\documentclass[tikz,border=5]{standalone}
\begin{document}
\tikz[every node/.style={circle, fill}]
\draw circle [radius=1] (90:2) -- (210:2) -- (330:2) -- cycle (0,0) node {}
\foreach \i in {90,210,330}{ (\i:2) node {} -- (\i+180:1) node {} };
\end{document}


A PSTricks solution:

\documentclass{article}

\usepackage{xfp}

\begin{document}

\psset{
dimen = m,
linewidth = 1pt
}
\pnodes{P}%
(0,0)%
\pspolygon(P1)(P3)(P5)
\multido{\iA = 1+1, \iB = 4+1}{3}{\psline(P\iA)(P\iB)}
\multido{\i = 0+1}{7}{\psdot[dotsize = 2pt 5](P\i)}
\end{pspicture}

\end{document}


All you have to do is choose the value of \radius and the drawing will be adjusted accoringly.

Notes:

Here's another variation using the through library for the circle:

\documentclass[tikz]{standalone}
\usetikzlibrary{through,shapes.geometric,calc}

\begin{document}

\begin{tikzpicture}
\node (triag) [draw, regular polygon, regular polygon sides=3, minimum width=20mm] {};
\path [fill] circle (.5mm);
\foreach \i/\j/\k in {1/2/3,2/3/1,3/1/2}
\coordinate  (triag side \i) at ($(triag.corner \j)!1/2!(triag.corner \k)$);
\foreach \i in {1,2,3}
{
\path [fill] (triag.corner \i) circle (.5mm) (triag side \i) circle (.5mm);
\draw (triag.corner \i) -- (triag side \i);
}
\node [draw] [circle through={(triag side 1)}] {};
\end{tikzpicture}

\end{document}


Some fancier pics:

\documentclass[tikz]{standalone}
\usetikzlibrary{through,shapes.geometric,calc}

\begin{document}

\tikzset{
pics/fano/.style n args={2}{%
code={
\node (triag) [draw, regular polygon, regular polygon sides=3, minimum width=#1, pic actions] {};
\path [fill, pic actions] circle (#2);
\foreach \i/\j/\k in {1/2/3,2/3/1,3/1/2}
\coordinate  (triag side \i) at ($(triag.corner \j)!1/2!(triag.corner \k)$);
\foreach \i in {1,2,3}
{
\path [fill, pic actions] (triag.corner \i) circle (#2) (triag side \i) circle (#2);
\draw [pic actions] (triag.corner \i) -- (triag side \i);
}
\node [draw, pic actions] [circle through={(triag side 1)}] {};
},
},
}

\begin{tikzpicture}
\draw pic {fano={25mm}{.75mm}};
\draw [xshift=25mm, blue] pic {fano={15mm}{.5mm}};
\draw [xshift=40mm, green] pic {fano={10mm}{.25mm}};
\end{tikzpicture}

\end{document}


Here's another variation using only nodes with any computation

\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\begin{document}
\begin{tikzpicture}

\node[blue,circle, draw,inner sep=0,minimum size=3cm,outer sep=0] (c) at(0,0){};
\node[regular polygon, regular polygon sides=3, draw,
inner sep=0,minimum size=6cm,red] (t) at (0.0,0) {};

\foreach \nn in {c.30,c.150,c.270,t.90,t.210,t.330}{
\node[fill=black,circle] at(\nn){};
}
\draw[green] (c.30) -- (t.210) (c.150) -- (t.330)  (c.270) -- (t.90);
\end{tikzpicture}

\end{document}


We had better have a Metapost solution as well. I've added the conventional numbering to the points.

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);

z1 = (0,4cm);
z2 = z1 rotated 120;
z4 = z2 rotated 120;
z3 = .5[z1,z2];
z5 = .5[z1,z4];
z6 = .5[z2,z4];
z7 = origin;

draw z1 -- z2 -- z4 -- cycle;
draw z3 .. z5 .. z6 .. cycle;

draw z1 -- z6;
draw z2 -- z5;
draw z3 -- z4;

for i=1 upto 7:
fill fullcircle scaled 12 shifted z[i];
label(decimal i infont "phvr8r", z[i]) withcolor white;
endfor

endfig;
end.


Note that drawing through three points with .. approximates a circular arc in plain MP.

The octonions in quaternion pairs,

\begin{center}
\newcommand*\circled[1]{
%\tikz[baseline=(char.base)]{
%            \node[shape=circle,draw=white,inner sep=0pt,fill=white] (char)
%{
\small{$$#1$$}
%}
%;}
}
\begin{tikzpicture}
\begin{scope}[very thick,decoration={
markings,
mark=at position 0.5 with {\arrow{>}}}
]
\draw[draw=white, double=black, thick,->] (0,0) circle (1);
\draw[thin,->] (1,0) -- (1,0.0001);
\draw[thin,->] (-1,0) -- (-1,-0.0001);

\draw[thin,->] ({-1/sqrt(2)},{-1/sqrt(2)}) -- ({-1/sqrt(2)+0.001},{-1/sqrt(2)-0.001});
\draw[thin,->] ({1/sqrt(2)},{-1/sqrt(2)}) -- ({1/sqrt(2)+0.001},{-1/sqrt(2)+0.001});

\node (0) at (0,0) {\circled{(0,1)}};

\foreach \i/\j/\k in {0/{(0,i)}/{(k,0)},1/{(0,j)}/{(i,0)},2/{(0,k)}/{(j,0)}}{%
\node[fill=white] (\i;0) at ({2*cos(-30+120*\i)},{2*sin(-30+120*\i)}) {$$\j$$};
\node[fill=white] (\i;1) at ({cos(30+120*\i)},{sin(30+120*\i)}) {$$\k$$};
}
\foreach \i/\j/\k/\l in {0/0/0/1,0/1/1/0,1/0/1/1,1/1/2/0,2/0/2/1,2/1/0/0}{%
\draw[thin,postaction={decorate}] (\i;\j) -- (\k;\l);
}
\draw[thin,postaction={decorate}] (0) -- (0;1);
\draw[thin,postaction={decorate}] (0) -- (1;1);
\draw[thin,postaction={decorate}] (2;1) -- (0);
\draw[thin,postaction={decorate}] (0) -- (0;0);
\draw[thin,postaction={decorate}] (0) -- (1;0);
\draw[thin,postaction={decorate}] (0) -- (2;0);
%\draw[thin,postaction={decorate}] (1) -- (7);
%\draw[thin,postaction={decorate}] (2) -- (4);
%\draw[thin,postaction={decorate}] (2) -- (5);
%\draw[thin,postaction={decorate}] (3) -- (4);
%\draw[thin,postaction={decorate}] (3) -- (6);
%\draw[thin,postaction={decorate}] (4) -- (5);
%\draw[thin,postaction={decorate}] (4) -- (6);
%\draw[thin,postaction={decorate}] (4) -- (7);
%\draw[thin,postaction={decorate}] (5) -- (3);
%\draw[thin,postaction={decorate}] (6) -- (1);
%\draw[thin,postaction={decorate}] (7) -- (2);
\end{scope}
\end{tikzpicture}
\end{center}
Rotating the diagram by $$\sfrac{1}{3}$$ of a revolution gives an automorphism of $$\Oct{}$$.
Rotating by $$\sfrac{1}{6}$$ doesn't work: the inner arrows don't go the right way, but if we change $$e_4 \mapsto -e_4$$, we fix that.
Similarly, if we flip the diagram by a reflection preserving the vertical axis, and then change the signs of $$e_6$$ and $$e_2$$ we find another automorphism.

We can also draw this diagram as a cube:
\begin{center}
\newcommand{\Depth}{1}
\newcommand{\Height}{1}
\newcommand{\Width}{1}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords]
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
\end{center}
with one vertex not marked.
If we let $$k=\Z{}/2\Z{}$$, then the cube is the set of points in $$k^3$$, or more precisely, since the unlabelled point is the origin and is deleted, the cube is the projective plane $$\Proj{2}_k$$ over the finite field $$k$$ of order 2.
The lines in this projective plane, suitably ordered, are
\begin{center}
\newcommand{\Depth}{1}
\newcommand{\Height}{1}
\newcommand{\Width}{1}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords]%Highlight the bottom
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);
%

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!110] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
\begin{tikzpicture}[tdplot_main_coords]%Highlight the left
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);
%

\draw[gray!10,fill=gray!90] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
\begin{tikzpicture}[tdplot_main_coords]%Highlight back face
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);
%

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!120] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
\begin{tikzpicture}[tdplot_main_coords]
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);
%

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\draw[gray!10,fill=gray!80,opacity=0.8] (0) -- (6) -- (4) -- (2) -- cycle;

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
\begin{tikzpicture}[tdplot_main_coords]
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);
%

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\draw[gray!10,fill=gray!80,opacity=0.8] (0) -- (1) -- (4) -- (5) -- cycle;

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
{
\tdplotsetmaincoords{50}{110}
\begin{tikzpicture}[tdplot_main_coords]
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\draw[gray!10,fill=gray!80,opacity=0.8] (0) -- (7) -- (4) -- (3) -- cycle;

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};

%% Following is for debugging purposes so you can see where the points are
%% These are last so that they show up on top
%\foreach \xy in {O, A, B, C, D, E, F, G}{
%    \node at (\xy) {\xy};
%}
\end{tikzpicture}
}
\begin{tikzpicture}[tdplot_main_coords]
\coordinate (0) at (0,0,0);
\coordinate (1) at (\Depth,0,\Height);
\coordinate (2) at (\Depth,\Width,0);
\coordinate (3) at (0,\Width,\Height);
\coordinate (4) at (\Depth,\Width,\Height);
\coordinate (5) at (0,\Width,0);
\coordinate (6) at (0,0,\Height);
\coordinate (7) at (\Depth,0,0);

\draw[gray!10,fill=gray!10] (0) -- (6) -- (1) -- (7) -- cycle;% Left Face
\draw[gray!10,fill=gray!30] (0) -- (7) -- (2) -- (5) -- cycle;% Bottom Face
\draw[gray!10,fill=gray!40] (0) -- (6) -- (3) -- (5) -- cycle;% Back Face
\draw[gray!10,fill=gray!20,opacity=0.6] (1) -- (4) -- (2) -- (7) -- cycle;% Front Face
\draw[gray!10,fill=gray!20,opacity=0.8] (1) -- (4) -- (3) -- (6) -- cycle;% Top Face
\draw[gray!10,fill=gray!20,opacity=0.8] (4) -- (3) -- (5) -- (2) -- cycle;% Right Face

\draw[gray!10,fill=gray!80,opacity=0.8] (1) -- (3) -- (2) -- cycle;

\node at (1) {\small$$1$$};
\node at (2) {\small$$2$$};
\node at (3) {\small$$3$$};
%\node at (4) {\small$$4$$};
\node at (5) {\small$$5$$};
\node at (6) {\small$$6$$};
\node at (7) {\small$$7$$};
\end{tikzpicture}
\end{center}
Each line represents a copy of the quaternions living inside $$\Oct{}$$, and if we label the lines with arrows, they recover our multiplication table.

• This has extra arrows in the bottom two edges of the circle and no arrow on the top. (It's also an answer to a slightly different question, but since I had exactly this different question, I'm not suggesting you delete it.) – Kimball Aug 23 '15 at 17:46