I have the following animation in beamer:
with the following code (probably not optimal):
\documentclass{beamer}
\usepackage{tikz}
\usepackage{multimedia}
\begin{document}
\begin{frame}[label=persistence]
\animate<1-10>
\begin{columns}
\begin{column}{5cm}
\foreach \n in {1,...,10} {
\begin{tikzpicture}[radius=2pt]
\only<\n>{
\node at (-1,6){};
\node at (6.5,0){};
\begin{scope}[fill opacity=0.2]
\filldraw[fill=yellow,draw=black] (1,1) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (2.3,1.1) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (4.5,0.8) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (5.1,1.8) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (0.4,3.3) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (2.1,2.8) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (3.8,3.5) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (4.8,4.2) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (0.8,4.9) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (2.1,4.1) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (3.8,2.0) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (3.5,0.6) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (3.0,5.0) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (4.1,5.1) circle (2+3*\n pt);
\filldraw[fill=yellow,draw=black] (0.9,2.1) circle (2+3*\n pt);
\end{scope}
\filldraw[red] (1,1) circle ;
\filldraw[red] (2.3,1.1) circle ;
\filldraw[red] (4.5,0.8) circle ;
\filldraw[red] (5.1,1.8) circle ;
\filldraw[red] (0.4,3.3) circle ;
\filldraw[red] (2.1,2.8) circle ;
\filldraw[red] (3.8,3.5) circle ;
\filldraw[red] (4.8,4.2) circle ;
\filldraw[red] (0.8,4.9) circle ;
\filldraw[red] (2.1,4.1) circle ;
\filldraw[red] (3.8,2.0) circle ;
\filldraw[red] (3.5,0.6) circle ;
\filldraw[red] (3.0,5.0) circle ;
\filldraw[red] (4.1,5.1) circle ;
\filldraw[red] (0.9,2.1) circle ;
}
\end{tikzpicture}
}
\end{column}
\begin{column}{.4\textwidth}
\begin{tikzpicture}
\filldraw[red] (1,1) circle ;
\filldraw[red] (2.3,1.1) circle ;
\filldraw[red] (4.5,0.8) circle ;
\filldraw[red] (5.1,1.8) circle ;
\filldraw[red] (0.4,3.3) circle ;
\filldraw[red] (2.1,2.8) circle ;
\filldraw[red] (3.8,3.5) circle ;
\filldraw[red] (4.8,4.2) circle ;
\filldraw[red] (0.8,4.9) circle ;
\filldraw[red] (2.1,4.1) circle ;
\filldraw[red] (3.8,2.0) circle ;
\filldraw[red] (3.5,0.6) circle ;
\filldraw[red] (3.0,5.0) circle ;
\filldraw[red] (4.1,5.1) circle ;
\filldraw[red] (0.9,2.1) circle ;
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}
\end{document}
Now, with the same set of points (the reds circles) I need to create an animate graph on the right side of the slide, where an edge between point $P$ and $Q$ will appear if the intersection between the neighborhoods is not empty. Is it possible with Tikz? The solution, that I have in mind is to define a vector for the points and then use two nested for. But I don't know how to do this.