Last active
May 31, 2019 07:32
-
-
Save Symbol1/83139b91d4b2d41628bca0147e324e44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[tikz,border=9]{standalone} | |
\usetikzlibrary{arrows.meta,decorations.pathreplacing} | |
\begin{document} | |
\def\colorlist{"","red","orange","yellow","green","cyan","violet"} | |
\tikzset{ | |
spindle/.style={ | |
decorate, | |
decoration={ | |
show path construction, | |
lineto code={ | |
\clip[bend left=20] | |
(\tikzinputsegmentfirst)to(\tikzinputsegmentlast)to cycle; | |
\filldraw[bend left=2, | |
line width=300/\pgfdecoratedinputsegmentlength] | |
(\tikzinputsegmentfirst)to(\tikzinputsegmentlast)to cycle; | |
} | |
} | |
} | |
} | |
\tikz{ | |
\foreach\A[count=\i]in{A,...,F}{ | |
\pgfmathsetmacro\ithcolor{{\colorlist}[\i]} | |
\path(\i*60:6)node(vertex\i) | |
[circle,draw,minimum size=2cm,line width=6pt]{}; | |
\fill[\ithcolor] | |
(vertex\i)+(2pt,0)circle(1) | |
(vertex\i)node[black,scale=3]{\sffamily\A}; | |
} | |
\foreach\i in{1,...,5}{ | |
\pgfmathtruncatemacro\ii{\i+1} | |
\foreach\j in{\ii,...,6}{ | |
\pgfmathsetmacro\ithcolor{{\colorlist}[\i]} | |
\pgfmathsetmacro\jthcolor{{\colorlist}[\j]} | |
\draw[preaction={spindle},line width=1.5, | |
{Stealth[fill=\jthcolor,length=20pt]}% | |
-{Stealth[fill=\ithcolor,length=20pt]}] | |
(vertex\i)--(vertex\j); | |
} | |
} | |
} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment