I am trying to automatically draw connections between nodes, such that if the blue circles overlap, they are to have a connection drawn between them. I feel like this can this be done with an if function, but I have absolutely no idea how to implement it?
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[ele/.style={fill=black,circle,minimum width=2pt,inner sep=1pt}]
\begin{scope}[elem/.style={circle, draw = black, line width = 0.2pt, fill = blue!60,fill opacity=0.3, minimum width = 30pt}]
\node[elem] (a) at (2.8209087137275, 1.18093727264829) {};
\node[elem] (b) at (2.95833231728538, 3.58594837328201) {};
\node[elem] (c) at (0.311441915093690, 1.55228774215654) {};
\node[elem] (d) at (1.69060866126193, 3.54516924716448) {};
\node[elem] (e) at (1.31799287927655, 0.304557156170160) {};
\node[elem] (f) at (1.61347687509477, 4.79163906483583) {};
\node[elem] (g) at (2.27043233468693, 2.38135190156370) {};
\node[elem] (h) at (1.20381702801476, 1.12542610389225) {};
\node[elem] (i) at (0.919304590945695, 2.48862221210784) {};
\node[elem] (j) at (1.64512903092519, 2.01677357394698) {};
\node[elem] (k) at (1.24383442716840, 3.78580579686650) {};
\node[elem] (l) at (1.58646607060451, 2.93089871716034) {};
\node[elem] (m) at (0.874518089942222, 2.13017381291781) {};
\node[elem] (n) at (1.46214937616206, 4.79124963787566) {};
\node[elem] (o) at (2.63312304723148, 0.206799557528458) {};
\node[ele] (a) at (2.8209087137275, 1.18093727264829) {};
\node[ele] (b) at (2.95833231728538, 3.58594837328201) {};
\node[ele] (c) at (0.311441915093690, 1.55228774215654) {};
\node[ele] (d) at (1.69060866126193, 3.54516924716448) {};
\node[ele] (e) at (1.31799287927655, 0.304557156170160) {};
\node[ele] (f) at (1.61347687509477, 4.79163906483583) {};
\node[ele] (g) at (2.27043233468693, 2.38135190156370) {};
\node[ele] (h) at (1.20381702801476, 1.12542610389225) {};
\node[ele] (i) at (0.919304590945695, 2.48862221210784) {};
\node[ele] (j) at (1.64512903092519, 2.01677357394698) {};
\node[ele] (k) at (1.24383442716840, 3.78580579686650) {};
\node[ele] (l) at (1.58646607060451, 2.93089871716034) {};
\node[ele] (m) at (0.874518089942222, 2.13017381291781) {};
\node[ele] (n) at (1.46214937616206, 4.79124963787566) {};
\node[ele] (o) at (2.63312304723148, 0.206799557528458) {};
\end{scope}
\end{tikzpicture}
\end{document}
