It is in tikz possible to fill area inside a cycle, right?
I am having issues with it and I can't figure out what I am messing up:
\documentclass[center]{article}
\usepackage{tikz}
\begin{document}
\centering
\begin{tikzpicture}[>=latex]
\node[circle, fill, inner sep = 0, minimum size = 2mm] (a) at (3,0,0) {};
\node[left of = a] {$a$};
\node[circle, fill, inner sep = 0, minimum size = 2mm] (b) at (5,0,4) {};
\node[left of = b] {$b$};
\node[circle, fill, inner sep = 0, minimum size = 2mm] (apb) at (8,0,1) {};
\node[right of = apb] {$a + b$};
\draw[->, very thin] (a) -- node[below] {$i_1$} (apb);
\draw[->, very thin] (b) -- node[below] {$i_2$} (apb);
\node[circle, fill, inner sep = 0, minimum size = 2mm] (fa) at (3,3,0) {};
\node[right of = fa, circle, minimum size = 6cm] {};
\node[left of = fa] {$f(a)$};
\node[circle, fill, inner sep = 0, minimum size = 2mm] (fb) at (5,3,4) {};
\node[right of = fb, circle, minimum size = 3cm] {};
\node[left of = fb] {$f(b)$};
\node[circle, fill, inner sep = 0, minimum size = 2mm] (fapb) at (8,3,1) {};
\node[right of = fapb, circle, minimum size = 3cm] {};
\node[right of = fapb] {$f(a + b)$};
\draw[very thin, dashed, blue, ->] (a) -- (fa);
\draw[very thin, dashed, blue, ->] (b) -- (fb);
\draw[very thin, dashed, blue, ->] (apb) -- (fapb);
\draw[very thin, ->] (fa) -- node[below] {$j_1$} (fapb);
\draw[very thin, ->] (fb) -- node[below] {$j_2$} (fapb);
\fill[red] (b) -- (apb) -- (a) -- cycle;
\end{tikzpicture}
\end{document}
As you can see the bottom two arrows are red, but I want the triangle between the bottom three point to be red. The triangle is described by the path (b) -- (apb) -- (a) --cycle however. So... what is problem?


a,bandapbare nodes. They have a size. The red lines connect only the borders of the nodes. You could use(b.center)--(apb.center)--(a.center)--cycle. – esdd Nov 30 '17 at 19:34