# Drawing a diagram of a three-cycle

How to draw this kind of circle on LaTeX?

-
Where would this go? Text? Figure? A bit of context would help because there can be several solutions and they are not all equally applicable. – Alenanno Jan 12 at 16:23
I would typically use xy-pic for that, but I'm not sure whether or not it is the best solution in this particular case. Let's say I'm sure it'd work with limited efforts, but not 100% sure it's optimal. Or go for tikz, but I'm even less comfortable with tikz. – Sergei Poulp Jan 12 at 16:29

For a true circular shape, use arcs instead of the to path.

\documentclass[tikz,border=2pt]{standalone}
\begin{document}

\begin{tikzpicture}[->,scale=.7]
\node (i) at (90:1cm)  {$i$};
\node (j) at (-30:1cm) {$j$};
\node (k) at (210:1cm) {$k$};

\draw (70:1cm)  arc (70:-10:1cm);
\draw (-50:1cm) arc (-50:-130:1cm);
\draw (190:1cm) arc (190:110:1cm);
\end{tikzpicture}

\end{document}


A more compact form using \foreach can be like this (with the same result as above):

\documentclass[tikz, border=2pt]{standalone}
\begin{document}

\begin{tikzpicture}[->,scale=.7]
\foreach \a/\t in {90/i,-30/j,210/k}{
\node (\t) at (\a:1cm) {$\t$};
\draw (\a-20:1cm)  arc (\a-20:\a-100:1cm);
}
\end{tikzpicture}

\end{document}


Edit: (in response to the OP's comment)

The arrows.meta library offers you the possibility to draw (almost) any arrow tip you may think of. To have the same look as that Metapost arrow tip, you can pass the following option to your environment:

-{Stealth[inset=0pt,length=4.5pt,angle'=35, round, bend]}


after loading the arrows.meta and bending libraries, of course.

\documentclass[tikz, border=2pt]{standalone}
\usetikzlibrary{arrows.meta, bending}
\begin{document}

\begin{tikzpicture}[-{Stealth[inset=0pt,length=4.5pt,angle'=35,round,bend]}, scale=.7]
\foreach \a/\t in {90/i,-30/j,210/k}{
\node (\t) at (\a:1cm) {$\t$};
\draw (\a-20:1cm)  arc (\a-20:\a-100:1cm);
}
\end{tikzpicture}

\end{document}


Here is now how this looks:

-
There is a way to have the ''arrow-head'' like in Thurston solution? – Andrea Leo Jan 13 at 8:23

Just for variety, you could also draw something like this using smartdiagram. The default produces rather more colourful diagrams with rather oversized nodes and undersized contents, for your purposes:

\smartdiagram[circular diagram:clockwise]{%
$i$,$j$,$k$
}


However, the sizing can be quite easily dealt with:

\smartdiagramset{module minimum width=0, module minimum height=0, text width=1em, font=\large}


as can the overly colourful appearance:

\smartdiagramset{uniform color list=gray!20 for 3 items, arrow color=gray, uniform arrow color=true}


Simply use circular diagram, omitting the clockwise, for the anti-clockwise direction:

Complete code:

\documentclass{article}
\usepackage{smartdiagram}
\begin{document}
\smartdiagram[circular diagram:clockwise]{%
$i$,$j$,$k$
}

\bigskip

\smartdiagramset{module minimum width=0, module minimum height=0, text width=1em, font=\large}

\smartdiagram[circular diagram:clockwise]{%
$i$,$j$,$k$
}

\bigskip

\smartdiagramset{uniform color list=gray!20 for 3 items, arrow color=gray, uniform arrow color=true}

\smartdiagram[circular diagram:clockwise]{%
$i$,$j$,$k$
}

\bigskip

\smartdiagram[circular diagram]{%
$i$,$j$,$k$
}

\end{document}

-
This is very particular solution! I like it! – Andrea Leo Jan 13 at 8:17

Here is a solution for LuaLatex using luamplib to make inline graphics. The mplibcode environment creates an hbox, which I have centered on the baseline using $\vcenter{...}$.

\documentclass{article}
\usepackage{luamplib}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
\begin{document}
\mplibcodeinherit{enable}
A circle going anti-clockwise $\vcenter{ \begin{mplibcode} path C; C = fullcircle scaled 32 rotated 90; beginfig(0); numeric a, b; for i=0 upto 2: a := 8/3 i; b := 8/3 (i+1); drawarrow subpath (a,b) of C cutbefore fullcircle scaled 16 shifted point a of C cutafter fullcircle scaled 16 shifted point b of C; label(textext("$" & char (105+i) & "$"), point a of C); endfor endfig; \end{mplibcode}}$ or clockwise $\vcenter{ \begin{mplibcode} beginfig(0); numeric a, b; for i=0 upto 2: a := 8/3 i; b := 8/3 (i+1); drawarrow subpath (b,a) of C cutbefore fullcircle scaled 16 shifted point b of C cutafter fullcircle scaled 16 shifted point a of C; label(textext("$" & char (105+i) & "$"), point a of C); endfor endfig; \end{mplibcode}}$ as you prefer.
\end{document}


## Notes

• The units are PostScript points 72 pt = 1in, 28.35 pt = 1cm.

• The predefined fullcircle path runs anticlockwise starting from "3 o'clock", so I rotated it here by 90° to make it start at the top.

• I've set \mplibcodeinherit{enable} so that the definition of path C can be reused in the second figure

• There are 8 points in a fullcircle, so the three points I needed were points 0, 8/3 and 16/3 of C. Note that point 24/3 of C == point 8 of C == point 0 of C.

• subpath (a,b) of C returns the subsection of path from point a to point b, which I've shortened using the (slightly cumbersome) cutbefore and cutafter facilities.

• You can reverse a subpath by swapping the order of the arguments.

• textext() is a luamplib extension that allows you to build up the correct dynamic string. Note that I've assumed that my font has the lower case alphabet in the standard ASCII positions.

For more on Metapost see: http://www.tug.org/metapost.html

For more on luamplib see: https://www.ctan.org/tex-archive/macros/luatex/generic/luamplib

-
Your solution is awesome! – Andrea Leo Jan 13 at 8:20

Something like this?

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{arrows.meta,bending}

\begin{document}
\begin{tikzpicture}

\node (i) at (90:1cm) {i};
\node (j) at (-30:1cm) {j};
\node (k) at (210:1cm) {k};

\draw[-{[bend]>}] (i) to[out=0, in=60] (j);
\draw[-{[bend]>}] (j) to[out=-150, in=-30] (k);
\draw[-{[bend]>}] (k) to[out=120, in=-180] (i);
\end{tikzpicture}

\end{document}


-
Is it just me or wouldn't the arrows look better if they were at bit more circular? – daleif Jan 12 at 17:13
@daleif: No, you're right. It probably draws a spline curve, not a circular arc. – Bernard Jan 12 at 17:37
@daleif: You're right. I also wanted to produce AboAmmar's result but I couldn't. – Ignasi Jan 12 at 17:48
Thank you, dude! – Andrea Leo Jan 13 at 8:16

We can draw a similar diagram, ignoring the circle style and the equilateral triangle style and draw it upside down with the following tex code

\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}[->,>=latex]
\node (a) {$i$};
\node (b) [above right of=a] {$j$};
\node (c) [above left of=a] {$k$};
\draw (a) -- (b);
\draw (b) -- (c);
\draw (c) -- (a);
\end{tikzpicture}
\end{document}


We can change -> to <- for the counter-clockwise diagram. And we can change >=latex to >=stealth for another popular arrow tip.

-