Given a set of coordinates, I want to generate a bounding "blob" of this set.
The closest I have gotten is this (surprisingly simple):
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\node (p1) at (0, 0) {A};
\node (p2) at (1, 1) {B};
\node (p3) at (2, 0.5) {C};
\draw plot [smooth cycle,tension=1] coordinates {(p1) (p2) (p3)};
\end{tikzpicture}
\end{document}
Which produces:
This has two issues:
- The plot goes through the nodes instead of around them. I could use modifiers like
.north
to fix this to some degree, but that is very tedious. - I have to specify the boundary coordinates in a proper order to produce the correct result.
How could I use TikZ to compute a bounding blob from a set of unordered coordinates?