Suppose that we have four nodes a, b, c, and d. For example :
\coordinate [label=left:a] (a) at (0,4);
\coordinate [label=right:b] (b) at (4,4);
\coordinate [label=left:c] (c) at (0,0);
\coordinate [label=right:d] (d) at (4,0);
Let's draw some arbitrary paths between every couple in {(a,b), (a,c), (c,d), (d,b), (b,a)}. Example :
\draw [red] (a) to [bend left=30] (c);
\draw [blue] (b) to [out=45, in= -50] (a);
\draw [orange] (c) to [controls=+(45:6) and +(170:6)] (d);
\draw [green!60!black,decorate,decoration={snake,pre length=1pt}] (d) -- (b);
To my knowledge
\path (a) -- (c) -- (d) -- (b) -- cycle;
is considered as one path, so therefore we can fill the area inside this path; But in the example above we have four paths and therefore the fill area is senseless for tikZ.
My Question : Is it possible to fuse all of paths (in example) to create one fillable path like \fill [blue!10] (a) -- (c) -- (d) -- (b) -- cycle;
or something else ? In other way, I want to hatch the surface S.
All code :
\documentclass[tikz, border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\mathversion{bold}
\begin{document}
\begin{tikzpicture}
\coordinate [label=left:a] (a) at (0,4);
\coordinate [label=right:b] (b) at (4,4);
\coordinate [label=left:c] (c) at (0,0);
\coordinate [label=right:d] (d) at (4,0);
\foreach \p in {a,b,c,d}{
\fill[red] (\p) circle (2pt);}
\draw [red] (a) to [bend left=30] (c);
\draw [blue] (b) to [out=45, in= -50] (a);
\draw [orange] (c) to [controls=+(45:6) and +(170:6)] (d);
\draw [green!60!black,decorate,decoration={snake,pre length=1pt}] (d) -- (b);
\node at (2,2.5) {$S$};
\end{tikzpicture}
\end{document}
To be more clear, I encountered this problem when creating a (breakable) tcolorbox
I want to fill the empty surface S, but with four paths I cannot do it.