I made the following diagram based on an excellent, very interesting answer to an earlier question.
%%% Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[border=9,tikz,rgb]{standalone}
\usetikzlibrary{arrows.meta,decorations.pathreplacing}
\tikzset{/pgf/arrow keys/colorsize/.style={fill=#1,length=10pt, line width=0.5pt}}
\begin{document}
%%% Set total number of vertices here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\N{6}
%%% Set vertex coordinates here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzdeclarecoordinatesystem{sunflower}{ % #1 is vertex index
\pgfmathsetmacro\sunindex{#1-.5}
\pgfmathsetmacro\sunangle{mod(\sunindex*16.18034,10)*36}
\pgfmathsetmacro\sunradius{sqrt(\sunindex)*50}
\pgfpointpolar{\sunangle}{\sunradius}
}
%%% Set colours here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\globalcolorstrue
\def\definesuncolor#1{
\pgfmathtruncatemacro\sunindex{#1-.5}
\pgfmathsetmacro\sunhue{mod(\sunindex*16.18034,10)*36}
\pgfmathsetmacro\sunsaturation{sqrt(\sunindex/\N)}
\definecolor{sun#1}{Hsb}{\sunhue,\sunsaturation,1}
}
%%% Draw here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikz{
%%% Draw vertices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach\i in{1,...,\N}{
\definesuncolor{\i}
\path(sunflower cs:\i)node(vertex\i)
[circle,draw,minimum size=2cm,line width=6pt]{};
\fill[sun\i](vertex\i)+(1pt,1pt)circle(1);
}
%%% Draw edges %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach\i in{2,...,\N}{
\foreach\j in{1,...,\numexpr\i-1}{
\path[scale=.666/sqrt(\N)]
[shift=(vertex\i)](sunflower cs:\j)coordinate(X-\i-\j)
[shift=(vertex\j)](sunflower cs:\i)coordinate(Y-\i-\j);
\draw[{Stealth[colorsize=sun\j]}-{Stealth[colorsize=sun\i]}]
[line width=.1](X-\i-\j)--(Y-\i-\j);
}
}
}
%%% End here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
I've played around with it a lot, but I still don't fully understand how it all pieces together. What I'd like to be able to do is make adaptations like this (drawn with Adobe Illustrator), while maintaining scalability, etc:
I asked this question a while back, hoping it might help me come up with a way to incorporate the two concepts and produce a hybrid, but my skills just aren't quite there yet.
So specifically: Instead of all the nodes pointing to every other node (once), they just need to point to the first node (twice).
In the end I managed to get this far:
%%% Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[border=9,tikz,rgb]{standalone}
\usetikzlibrary{arrows.meta,calc}%,decorations.pathreplacing}
\tikzset{/pgf/arrow keys/colorsize/.style={fill=#1,length=10pt,line width=0.4pt,scale=1}}
\begin{document}
%%% Set total number of vertices here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\N{6}
%%% Set vertex coordinates here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzdeclarecoordinatesystem{sunflower}{ % #1 is vertex index
\pgfmathsetmacro\sunindex{#1-.5}
\pgfmathsetmacro\sunangle{mod(\sunindex*16.18034,10)*36}
\pgfmathsetmacro\sunradius{sqrt(\sunindex)*50}
\pgfpointpolar{\sunangle}{\sunradius}
}
%%% Set colours here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\globalcolorstrue
\def\definesuncolor#1{
\pgfmathtruncatemacro\sunindex{#1-.5}
\pgfmathsetmacro\sunhue{mod(\sunindex*16.18034,10)*36}
\pgfmathsetmacro\sunsaturation{sqrt(\sunindex/\N)}
\definecolor{sun#1}{Hsb}{\sunhue,\sunsaturation,1}
}
%%% Draw here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikz{
%%% Draw vertices %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach\i in{1,...,\N}{
\definesuncolor{\i}
\path(sunflower cs:\i)node(vertex\i)
[circle,draw,minimum size=2cm,line width=6pt]{};
\fill[sun\i](vertex\i)+(1pt,1pt)circle(1);
}
%%% Draw edges %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach\i in{2,...,\N}{
\foreach\j in{1,...,\i}{
\path[scale=.666/sqrt(\N)]
[shift=(vertex\i)](sunflower cs:\j)coordinate(X-\i-\j)
[shift=(vertex\j)](sunflower cs:\i)coordinate(Y-\i-\j);}
\draw[{Stealth[colorsize=sun1]}-{Stealth[colorsize=sun\i]}]
[line width=.1](X-\i-1)--(Y-\i-1);
}
}
%%% End here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
So that's one down. Now I just need to double up on these edges and arrowheads but I'm not sure how to incorporate the following syntax into it:
\draw[arr=1em] ($(c)!1mm!90:(n\i)$) -- ($(n\i)!1mm!-90:(c)$);
\draw[arr=1em] ($(c)!1mm!-90:(n\i)$) -- ($(n\i)!1mm!90:(c)$);






\j. – Jul 05 '19 at 21:49