I'm trying to build a large inverted tree structure in Tikz, like the one below (except much larger, and ideally recursive):
In this tree structure, each 'line' is made up of three nodes, and each of those nodes will have a parent which is the bottom node in another line.
Is it possible to write this recursively in such a way that I can easily change the amount of nodes per line (at the moment this is 3) and the maximum amount of lines (at the moment this is 5)?
I manually generated the above diagram using the code below:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[every node/.style={draw,shape=circle,fill=black}]
\node[fill=red] (A) at (0,0) {};
\node[fill=red] (B) at (0,1) {};
\node[fill=red] (C) at (0,2) {};
\draw (A) -- (B) (B) -- (C);
\node (D) at (2,1) {};
\node (E) at (2,2) {};
\node (F) at (2,3) {};
\draw (A) -- (D) (D) -- (E) (E) -- (F);
\node (G) at (-1,2) {};
\node (H) at (-1,3) {};
\node (I) at (-1,4) {};
\draw (B) -- (G) (G) -- (H) (H) -- (I);
\node (J) at (1,3) {};
\node (K) at (1,4) {};
\node (L) at (1,5) {};
\draw (C) -- (J) (J) -- (K) (K) -- (L);
\node (M) at (-2,3) {};
\node (N) at (-2,4) {};
\node (O) at (-2,5) {};
\draw (G) -- (M) (M) -- (N) (N) -- (O);
\end{tikzpicture}
\end{document}

each of those nodes will have a parent which is the bottom node in another line? Surely not! – cfr Apr 01 '16 at 10:385is not a valid number of lines, as suggested in the question? – cfr Dec 08 '16 at 23:28