Based on this hierarchical diagram in tikz using the forest package, i wanted a modified version of it. Currently i have
\documentclass[tikz,border=10pt]{standalone}
\usepackage{verbatim}
\usepackage{forest}
\usetikzlibrary{arrows.meta, shapes.geometric, calc, shadows}
% colors
\colorlet{mygreen}{green!75!black}
\colorlet{col1in}{red!30}
\colorlet{col1out}{red!40}
\colorlet{col2in}{mygreen!40}
\colorlet{col2out}{mygreen!50}
\colorlet{col3in}{blue!30}
\colorlet{col3out}{blue!40}
\colorlet{col4in}{mygreen!20}
\colorlet{col4out}{mygreen!30}
\colorlet{col5in}{blue!10}
\colorlet{col5out}{blue!20}
\colorlet{col6in}{blue!20}
\colorlet{col6out}{blue!30}
\colorlet{col7out}{orange}
\colorlet{col7in}{orange!50}
\colorlet{col8out}{orange!40}
\colorlet{col8in}{orange!20}
\colorlet{linecol}{blue!60}
\begin{document}
\pgfkeys{/forest,
rect/.append style = {rectangle, rounded corners = 2pt,
inner color = col6in, outer color = col6out},
ellip/.append style = {ellipse, inner color = col5in,
outer color = col5out},
orect/.append style = {rect, font = \sffamily\bfseries\LARGE,
text width = 325pt, text centered,
minimum height = 10pt, outer color = col7out,
inner color=col7in},
oellip/.append style = {ellip, inner color = col8in, outer color = col8out,
font = \sffamily\bfseries\large, text centered}}
\begin{forest}
for tree={
font=\sffamily\bfseries,
line width=1pt,
draw=linecol,
ellip,
align=center,
child anchor=north,
parent anchor=south,
drop shadow,
l sep+=12.5pt,
edge path={
\noexpand\path[color=linecol, rounded corners=5pt,
>={Stealth[length=10pt]}, line width=1pt, ->, \forestoption{edge}]
(!u.parent anchor) -- +(0,-5pt) -|
(.child anchor)\forestoption{edge label};
},
where level={3}{tier=tier3}{},
where level={0}{l sep-=15pt}{},
where level={1}{
if n={1}{
edge path={
\noexpand\path[color=linecol, rounded corners=5pt,
>={Stealth[length=10pt]}, line width=1pt, ->,
\forestoption{edge}]
(!u.west) -| (.child anchor)\forestoption{edge label};
}
}{
edge path={
\noexpand\path[color=linecol, rounded corners=5pt,
>={Stealth[length=10pt]}, line width=1pt, ->,
\forestoption{edge}]
(!u.east) -| (.child anchor)\forestoption{edge label};
},
}
}{}
}
[Light Detection and Ranging\\LiDAR, inner color=col1in, outer color=col1out
[Scanning, inner color=col2in, outer color=col2out
[Spinning head\\with single-spot\\sensors, inner color=col4in, outer color=col4out]
[Moving mirrors/\\prisms, inner color=col4in, outer color=col4out
[Rotating/oscillating\\macro mirrors/prisms, inner color=col8in, outer color=col8out]
[Oscillating MEMS\\mirror, inner color=col8in, outer color=col8out]
]
[Optical phased-\\arrays, inner color=col4in, outer color=col4out]
]
[Non-scanning (staring), inner color=col2in, outer color=col2out
[Fixed (multi-)\\beam, inner color=col4in, outer color=col4out]
[Diffuse light cone\\ ``FLASH'' LiDAR, inner color=col4in, outer color=col4out]
]
]
\end{forest}
\end{document}
As you can see the connection at second level is not optimized for three children. The "moving mirrors/prisms" ellipse is really bad connected to its parent "Scanning".
The forest documentation is not really helpful on this topic, as far as i can see. How can i set level options, so that everything is the same, but the ellipse in middle is directly connected "south" to its parent?



calign=child, defines what the central aligned child should be, thencalign child=2sets the second child as primary child? So there are always both needed andcalign=2would not work? – Thomas Neubauer Jan 17 '19 at 14:47calign child=ndefines the primary child node to be the n th one. Unfortunately I can't give you any details on the internal placement algorithm, but as I understand forest the primary node is the one that is placed directly under (or above, if that is yourgrow=value) the parent. And thencalign=childsays that the parent should be aligned to a specific child. Otherwise, if you setcalign=midpoint, the parent will be horizontally placed not to a specific child, but to the mid distance between primary and secondary child. – Felix Emanuel Jan 17 '19 at 16:27