# Drawing many bent paths [(n*(n+1))/2] in a nice way (tikz)

I have to draw a graph where many nodes (n=13) are all connected with paths to each other (k=78, k=[n*[n+1]]/2). The paths should be bent (APA style requires this for paths that symbolise correlations in a CFA visualisation).

At the moment I did everything by hand and got the following:

This was accomplished using the following (rather long-winded) code:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usepackage{calc}
\usetikzlibrary{arrows,positioning,shapes}
\newcommand{\at}{\makeatletter @\makeatother}
\begin{document}
\begin{tikzpicture}[auto, node distance=.2cm,
latent/.style={circle, draw , very thick, inner sep=0pt, minimum size=22mm, align=center},
twopaths/.style={<->, thick, >=stealth'}
]

\node [latent] (AFACET) at (0,0) {A};
\node [latent] (BFACET) [below left=0cm and 3cm of AFACET] {B};
\node [latent] (CFACET) [below right=1cm and 3cm of AFACET] {C};
\node [latent] (DFACET) [below=3cm of BFACET] {D};
\node [latent] (EFACET) [below=2cm of DFACET] {E};
\node [latent] (FFACET) [below=2cm of EFACET] {F};
\node [latent] (GFACET) [below=2cm of FFACET] {G};
\node [latent] (HFACET) [below=2cm of GFACET] {H};
\node [latent] (IFACET) [below=2cm of CFACET] {I};
\node [latent] (JFACET) [below=2cm of IFACET] {J};
\node [latent] (KFACET) [below=4cm of JFACET] {K};
\node [latent] (LFACET) [below=3cm of KFACET] {L};
\node [latent] (MFACET) [below=23cm of AFACET] {M};

\draw [twopaths] (BFACET) to [bend left=10] node {} (AFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (CFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (DFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (IFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (JFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (KFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (LFACET);
\draw [twopaths] (BFACET) to [bend left=22] node {} (MFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (EFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (FFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (GFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (HFACET);

\draw [twopaths] (AFACET) to [bend left=10] node {} (CFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (DFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (IFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (JFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (KFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (LFACET);
\draw [twopaths] (AFACET) to [bend right=2] node {} (MFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (EFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (FFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (GFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (HFACET);

\draw [twopaths] (CFACET) to [bend right=10] node {} (DFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (IFACET);
\draw [twopaths] (CFACET) to [bend right=30] node {} (JFACET);
\draw [twopaths] (CFACET) to [bend right=30] node {} (KFACET);
\draw [twopaths] (CFACET) to [bend right=30] node {} (LFACET);
\draw [twopaths] (CFACET) to [bend right=18] node {} (MFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (CFACET) to [bend right=5] node {} (HFACET);

\draw [twopaths] (DFACET) to [bend left=10] node {} (IFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (JFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (KFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (LFACET);
\draw [twopaths] (DFACET) to [bend left=18] node {} (MFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (EFACET);
\draw [twopaths] (DFACET) to [bend left=30] node {} (FFACET);
\draw [twopaths] (DFACET) to [bend left=30] node {} (GFACET);
\draw [twopaths] (DFACET) to [bend left=30] node {} (HFACET);

\draw [twopaths] (IFACET) to [bend right=10] node {} (JFACET);
\draw [twopaths] (IFACET) to [bend right=22] node {} (KFACET);
\draw [twopaths] (IFACET) to [bend right=30] node {} (LFACET);
\draw [twopaths] (IFACET) to [bend right=18] node {} (MFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (IFACET) to [bend right=5] node {} (HFACET);

\draw [twopaths] (JFACET) to [bend right=10] node {} (KFACET);
\draw [twopaths] (JFACET) to [bend right=30] node {} (LFACET);
\draw [twopaths] (JFACET) to [bend right=18] node {} (MFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (JFACET) to [bend right=5] node {} (HFACET);

\draw [twopaths] (KFACET) to [bend right=10] node {} (LFACET);
\draw [twopaths] (KFACET) to [bend right=18] node {} (MFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (KFACET) to [bend right=5] node {} (HFACET);

\draw [twopaths] (LFACET) to [bend left=10] node {} (MFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (LFACET) to [bend right=5] node {} (HFACET);

\draw [twopaths] (MFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (MFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (MFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (MFACET) to [bend left=10] node {} (HFACET);

\draw [twopaths] (EFACET) to [bend left=10] node {} (FFACET);
\draw [twopaths] (EFACET) to [bend left=30] node {} (GFACET);
\draw [twopaths] (EFACET) to [bend left=30] node {} (HFACET);

\draw [twopaths] (FFACET) to [bend left=10] node {} (GFACET);
\draw [twopaths] (FFACET) to [bend left=30] node {} (HFACET);

\draw [twopaths] (GFACET) to [bend left=10] node {} (HFACET);

\end{tikzpicture}
\end{document}


In principle everything works as expected. However, I dislike that the paths are not aligned and bent in an orderly way. It just doesn't look nice.

Is there a way to somehow manage the alignment and the bending of the paths so that they look more symmetrically?

Ps.: Here, the labels A ... M are generic ones. In the 'real' figure they are replaced with different terms (concepts).

• Would it help if the nodes were arranged on a regular n-gon? Complete graphs are often drawn that way. – David R Oct 5 '15 at 8:33
• Unfortunately not - The figure you can see above is only a part of the whole figure. The issue is that I already tend to run out of space on a normal page. So an n-gon is not an option, unfortunately. – phx Oct 5 '15 at 11:26
• Have you looked at the graph drawing algorithms available? – cfr Oct 30 '16 at 0:50
• I don't think anybody would be able to follow any path on the image so it is a wasted effort to make it better. – percusse Oct 30 '16 at 14:18

Hmm, you're right that it's tricky to position the nodes so that the same amount of bend will always work. Here's my solution:

\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[
latent/.style={circle, draw , very thick, inner sep=0pt, minimum size=22mm, align=center},
twopaths/.style={<->, >=latex, thick, bend right=20}
]

\draw (0,0) node[latent] (n0) {$A$} node[latent, draw=none] (n13) {};
\foreach \name [count=\i,
evaluate=\i as \ii using int(\i+13),
evaluate=\i as \p using \i/7] in {C,I,J,K,L,M}{
\path (1,0) .. controls (6,-3) and (6,-18) .. (0,-21) node[latent, pos=\p] (n\i) {$\name$} node[latent, draw=none, pos=\p] (n\ii) {};
}
\foreach \name [count=\i from 7,
evaluate=\i as \ii using int(\i+13),
evaluate=\i as \p using 1-(\i-6)/7] in {H,G,F,E,D,B}{
\path (-1,0) .. controls (-6,-3) and (-6,-18) .. (0,-21) node[latent, pos=\p] (n\i) {$\name$} node[latent, draw=none, pos=\p] (n\ii) {};
}
\foreach \x in {1,...,13}{
\foreach \d [evaluate=\d as \y using int(\x+\d)] in {1,...,6}{
\draw[twopaths] (n\x) to (n\y);
}
}
\end{tikzpicture}
\end{document}


Even if there is no room for an n-gon layout as discussed in comments, I think that using a symmetic layout gives a better chance of a less jumbled appearance, so I moved your bottom node to the right and equalised the spacing.

it would be possible to reduce the coding a bit using some foreach loops but as the amount of bend is chosen by eye in each case, keeping it as you had it is probably simpler. having symmetrised the node layout I then ensured that the arcs were symmetric, using the matching curvature for each opposite pair of nodes.

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usepackage{calc}
\usetikzlibrary{arrows,positioning,shapes}
\newcommand{\at}{\makeatletter @\makeatother}
\begin{document}
\begin{tikzpicture}[auto, node distance=.2cm,
latent/.style={circle, draw , very thick, inner sep=0pt, minimum size=22mm, align=center},
twopaths/.style={<->, thick, >=stealth'}
]

\node [latent] (AFACET) at (0,0) {A};
\node [latent] (BFACET) [below left=0cm and 3cm of AFACET] {B};
\node [latent] (CFACET) [below right=0cm and 3cm of AFACET] {C};
\node [latent] (DFACET) [below=2cm of BFACET] {D};
\node [latent] (EFACET) [below=2cm of DFACET] {E};
\node [latent] (FFACET) [below=2cm of EFACET] {F};
\node [latent] (GFACET) [below=2cm of FFACET] {G};
\node [latent] (HFACET) [below=2cm of GFACET] {H};
\node [latent] (IFACET) [below=2cm of CFACET] {I};
\node [latent] (JFACET) [below=2cm of IFACET] {J};
\node [latent] (KFACET) [below=2cm of JFACET] {K};
\node [latent] (LFACET) [below=2cm of KFACET] {L};
\node [latent] (MFACET) [below=2cm of LFACET] {M};

\draw [twopaths] (AFACET) to [bend right=10] node {} (BFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (DFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (EFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (FFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (GFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (HFACET);
\draw [twopaths] (AFACET) to [bend left=10] node {} (CFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (IFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (JFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (KFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (LFACET);
\draw [twopaths] (AFACET) to [bend right=10] node {} (MFACET);

\draw [twopaths] (BFACET) to [bend left=-10] node {} (DFACET);
\draw [twopaths] (BFACET) to [bend left=25] node {} (EFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (FFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (GFACET);
\draw [twopaths] (BFACET) to [bend left=30] node {} (HFACET);
\draw [twopaths] (BFACET) to [bend left=-5] node {} (CFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (IFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (JFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (KFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (LFACET);
\draw [twopaths] (BFACET) to [bend left=10] node {} (MFACET);

\draw [twopaths] (CFACET) to [bend right=10] node {} (DFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (CFACET) to [bend right=10] node {} (HFACET);
\draw [twopaths] (CFACET) to [bend right=-10] node {} (IFACET);
\draw [twopaths] (CFACET) to [bend right=25] node {} (JFACET);
\draw [twopaths] (CFACET) to [bend right=30] node {} (KFACET);
\draw [twopaths] (CFACET) to [bend right=30] node {} (LFACET);
\draw [twopaths] (CFACET) to [bend right=30] node {} (MFACET);

\draw [twopaths] (DFACET) to [bend left=-10] node {} (EFACET);
\draw [twopaths] (DFACET) to [bend left=20] node {} (FFACET);
\draw [twopaths] (DFACET) to [bend left=30] node {} (GFACET);
\draw [twopaths] (DFACET) to [bend left=50] node {} (HFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (IFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (JFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (KFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (LFACET);
\draw [twopaths] (DFACET) to [bend left=10] node {} (MFACET);

\draw [twopaths] (IFACET) to [bend right=-10] node {} (JFACET);
\draw [twopaths] (IFACET) to [bend right=20] node {} (KFACET);
\draw [twopaths] (IFACET) to [bend right=30] node {} (LFACET);
\draw [twopaths] (IFACET) to [bend right=50] node {} (MFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (IFACET) to [bend right=10] node {} (HFACET);

\draw [twopaths] (JFACET) to [bend right=-10] node {} (KFACET);
\draw [twopaths] (JFACET) to [bend right=30] node {} (LFACET);
\draw [twopaths] (JFACET) to [bend right=50] node {} (MFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (JFACET) to [bend right=10] node {} (HFACET);

\draw [twopaths] (KFACET) to [bend right=-10] node {} (LFACET);
\draw [twopaths] (KFACET) to [bend right=40] node {} (MFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (KFACET) to [bend right=10] node {} (HFACET);

\draw [twopaths] (LFACET) to [bend right=-10] node {} (MFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (LFACET) to [bend right=10] node {} (HFACET);

\draw [twopaths] (MFACET) to [bend right=10] node {} (EFACET);
\draw [twopaths] (MFACET) to [bend right=10] node {} (FFACET);
\draw [twopaths] (MFACET) to [bend right=10] node {} (GFACET);
\draw [twopaths] (MFACET) to [bend left=10] node {} (HFACET);

\draw [twopaths] (EFACET) to [bend left=-10] node {} (FFACET);
\draw [twopaths] (EFACET) to [bend left=30] node {} (GFACET);
\draw [twopaths] (EFACET) to [bend left=50] node {} (HFACET);

\draw [twopaths] (FFACET) to [bend left=-10] node {} (GFACET);
\draw [twopaths] (FFACET) to [bend left=40] node {} (HFACET);

\draw [twopaths] (GFACET) to [bend left=-10] node {} (HFACET);

\end{tikzpicture}
\end{document}


Does APA style accept circuit board?

\documentclass[border=9,tikz]{standalone}
\usepackage{}
\usetikzlibrary{}
\begin{document}

\tikzset{
label/.style={
line width=1,draw,minimum size=4cm
},
<-->/.style={
line width=1,<->,shorten <=1,shorten >=1
}
}

\tikz{
\foreach\A[count=\i]in{A,B,C,D,E,F,G}{
\draw(0,\i*5-5)node[label]{\A};
}
\foreach\A[count=\i]in{H,I,J,K,L,M}{
\draw(19,\i*6-6)node[label]{\A};
}
\foreach\i in{1}{
\draw[<-->](2,30-1/4)--+(10/4,0)|-(2,1/4);
}
\foreach\i in{1,...,5}{
\draw[<-->](2,30-\i/4-1/4)--+(10/4-\i/4,0)|-(2,\i*5+\i/4+1/4);
\draw[<-->](2,\i*5+\i/4-7/4)--+(10/4-\i/4,0)|-(2,\i/4+1/4);
}
\foreach\i in{1,...,3}{
\draw[<-->](2,25-\i/4-3/4)--+(5/4-\i/4,0)|-(2,\i*5+5+\i/4+3/4);
\draw[<-->](2,\i*5+5+\i/4-7/4)--+(5/4-\i/4,0)|-(2,5+\i/4+3/4);
}
\foreach\i in{1,...,1}{
\draw[<-->](2,20-6/4)--+(1/4,0)|-(2,\i*5+10+\i/4+5/4);
\draw[<-->](2,\i*5+10+\i/4-7/4)--+(1/4,0)|-(2,10+6/4);
}
\foreach\i in{1}{
\draw[<-->](17,30-2/4)--+(-8/4,0)|-(17,2/4);
}
\foreach\i in{1,...,4}{
\draw[<-->](17,30-\i/4-2/4)--+(-8/4+\i/4,0)|-(17,\i*6+\i/4+2/4);
\draw[<-->](17,\i*6+\i/4-7/4)--+(-8/4+\i/4,0)|-(17,\i/4+2/4);
}
\foreach\i in{1,...,2}{
\draw[<-->](17,24-\i/4-4/4)--+(-4/4+\i/4,0)|-(17,\i*6+6+\i/4+4/4);
\draw[<-->](17,\i*6+6+\i/4-7/4)--+(-4/4+\i/4,0)|-(17,6+\i/4+4/4);
}
\foreach\i in{1}{
\draw[<-->](17,18-6/4)--+(-1/4,0)|-(17,12+6/4);
}
\foreach\i in{1,...,7}{
\foreach\j in{1,...,6}{
\draw[<-->](2,\i*5-5+\i/4+\j/4-15/8)-|
({(6*(\i+\j)+max(7-\i-\j,0)-max(\i+\j-8,0)+\j-18.5)/8+4.2},{(6*(\i+\j)+max(7-\i-\j,0)-max(\i+\j-8,0)+\j-18.5)/2+.25})--+(3.75,0)|-(17,\j*6-6+\j/4+\i/4-15/8);
}
}
}

\end{document}

• This would be a very uncommon form to present the figure I have to present. Thanks, nevertheless! – phx Oct 30 '16 at 8:26
• @phx Legibility is uncommon, then?! – cfr Oct 30 '16 at 23:36
• @cfr no, but there a certain standards to how to visualise models (circles = latent factors, square = manifest indicators, bent arrows = correlations, etc.). So it makes sense to follow these standards if you want to be understood in your community... – phx Oct 31 '16 at 11:32
• @phx I wasn't serious :|. – cfr Oct 31 '16 at 12:25
• @cfr Fair enough, I didn't realise :p – phx Oct 31 '16 at 16:03

Is there special reason that nodes are not placed on circle?

\documentclass[border=3mm,tikz]{standalone}
\newcounter{graphnode}
\renewcommand\thegraphnode{\Alph{graphnode}}

\begin{document}
\begin{tikzpicture}[
every node/.style={draw=blue,shape=circle,fill=blue!30,inner sep=1pt,
minimum size=4.4mm, font=\small, text=white}
]
%%%% variable data data
\def\numpoly{13}%number of nodes
\def\startangle{90}%angle of the first node
%------- calculations positions angles
\pgfmathparse{int(\startangle+360/\numpoly)}%
\let\nextangle=\pgfmathresult
\pgfmathparse{int(\startangle-360/\numpoly+360)}%
\let\endangle=\pgfmathresult
%--- regular polygon nodes
\foreach \i [count=\ii from 1] in {\startangle,\nextangle,...,\endangle}
{
\stepcounter{graphnode}
}
%--- nodes interconnections
\foreach \x in {1,...,\numpoly}
\foreach \y in {\x,...,\numpoly}
\draw (p\y) -- (p\x);
\end{tikzpicture}
\end{document}

• Wasn't that reason what was discussed in the comments on the question? Or did I misunderstand? – cfr Oct 30 '16 at 13:46
• Now I see, that it was discussed. What to do? Erase my answer? – Zarko Oct 30 '16 at 15:47
• Sorry, I never really know what to do myself when this happens :(. – cfr Oct 30 '16 at 17:00
• Zarko: Don't worry. I still like your answer. Don't delete it :). – phx Oct 30 '16 at 18:39

I don't know that this looks any better, but it demonstrates how to use the graphs syntax to make the original code a bit less verbose. Perhaps you should look into use the graph-drawing layout algorithms, too. However, that would require LuaTeX, while simply using the syntax as shown below will work with any engine.

\documentclass[border=10pt,multi,tikz]{standalone}
\usetikzlibrary{graphs,positioning}
\begin{document}
\begin{tikzpicture}[every node/.style={circle, draw, minimum size=20pt}]
\node (A) {A};
\foreach \i/\k [remember=\i as \j (initially A)] in {B/C,D/I,E/J,F/K,G/L,H/M}
{
\node (\i) [below left=of A |- \j] {\i};
\node (\k) [below right=of A |- \j] {\k};
}
\graph [use existing nodes, edges={bend left, <->}] {
A --[complete bipartite]
{
B,D,E,F,G,H
};
{
C,I,J,K,L,M
}
--[complete bipartite]
A;
{
B,D,E
}--[complete bipartite]
{
C,I,J
};
{
K,L,M
}--[complete bipartite]
{
F,G,H
};
{
E
}--
{
K,L
};
{
J
}--
{
F,G
};
{
F
}--
{
I,J
};
{
K
}--
{
D,E
};
{
[edges={bend right=15, <->}]
B -- K;
C -- F;
D -- L;
I -- G;
E -- M;
J -- H;
};
{
[edges={bend left=10, <->}]
B -- L;
C -- G;
D -- M;
I -- H;
};
{
[edges={bend right=5, <->}]
B -- M;
C -- H;
};
C -- I -- J -- K -- L -- M;
H -- G -- F -- E -- D -- B;
B -- {E,F,G,H};
E -- {G,H};
F -- H;
M -- {K,J,I,C};
L -- {J,I,C};
K -- {I,C};
J -- C;
};
\end{tikzpicture}
\end{document}


If you break down the cases further, you can tweak the degree of bend to get a nicer result. I only differentiated cases where not doing so actually caused connections to cross nodes.